IDENTIFIERS
IN ‘’C LANGUAGE’’
Smallest identifying unit in our program is called
identifiers.
In our c program any line that consist of lot if
words that words are called identifiers.
IDENTIFIERS
ARE OF THREE TYPES ;
1. CONSTANT
2. VARIABLES
3. KEYWORDS.
1.CONSTANTS.
Any information in c language that
cannot be changed is called constants.
Constants are of two types.
A).primary.
a)Integer
b)Real
c)Character
B).secondary.
a).Array
b).String
c).Pointer
d).Union
e).Structure
f).Enumerator
a).Integer
Any number that is negative
,positive or zero all are integers.
Ex=2,4,-2,-4,0 etc.
But integer do not consist of
decimal numbers .
Like=2.2,-2.2,2.0 etc.
b).Real
It is also called float point
because they consist of all numbers that have decimals.
Ex=2.0,290.3,-2.44 etc.
c).Character
Any symbol that consist of single
letter with single codes are called characters.
Like=’a’ , ’b’ etc.
It does not contain more than one
symbol.
Like=’-2’ it is not a character
because it consist of two symbols ‘-’’and’2’.
2.
VARIABLE
Variable are the name of memory location
where we store data.
Rules of variable
·
Variable name is any combination of
alphabet , digit and underscore.
·
A valid variable name can not start with
digits.
3)
Keywords.
Keywords are predefined words or reserved words that cannot be change.
There are 32 keywords in c
language.