Constants
in C :
A constant is an entity that doesn't change during the execution
of a program.
Followings are the different types of constants :
·
It must have at least one digit.
·
It must have a decimal point which may be positive or negative.
·
Use of blank space and comma is not allowed between real
constants.
·
Example:
+194.143, -416.41
·
It must have at least one digit.
·
It should not contain a decimal place.
·
It can be positive or negative.
·
Use of blank space and comma is not allowed between real
constants.
·
Example:
1990, 194, -394
·
It is a single alphabet or a digit or a special symbol enclosed
in a single quote.
·
Maximum length of a character constant is 1.
·
Example:
'T', '9', '$'
·
It is collection of characters enclosed in double quotes.
·
It may contain letters, digits, special characters and blank
space.
·
Example:
"Learn Programming"
No comments:
Post a Comment