Monday, January 5, 2009

Constants in C programming language

Constants
Be sure you understand the difference between a 'constant' and a declaration. A constant has a value that cannot be changed. For example:

1234
'x'
9.89
"String"


Constants are used to assign a value to a variable. E.G

int i; /* declare a variable called 'i' */
i=1234; /* assign the constant value 1234 to
* the variable 'i' */
i++; /* Change the value of the variable. */

* Integer constants.
* Floating point constants.
* Character constants.
* String constants.

read More........

Floating point constants.
Character constants.
String constants.

No comments:

Blog List