Home » , , » Constants and Symbolic Constants in C Program

Constants and Symbolic Constants in C Program

Written By Unknown on Monday, October 7, 2013 | 3:32 PM

Constants :
Constants is a type of value of a program that we can not change after running the program.So the value of constants is unchangeable.

There are two type of Constants in C :

                                                                           Constants
                                                                                  |
                                          1.Literal Constants                      2.Symbolic Constants

1.Literal Constants :
                                           5x^2 + 9y + c = 11;

Here 5 and 9 is literal Constants because when we run the program we can't change the value of 9,5 and 11.

Symbolic Constants :
This type of Constants are declared through a defined name.After running the program these values remain unchangeable.

Ex    :                                  int i = 10;
                                            i = i+1;

There are many kind of symbolic Constants like integer constant,float and double constant,character constant,string constant
Share this article :

Post a Comment

 
Support : Creating Website | Johny Template | Mas Template
Copyright © 2011. Learn Programming - All Rights Reserved
Template Created by Creating Website Published by Mas Template
Proudly powered by Blogger| Distributed by Rocking Templates