Identifiers And Keywords in C language : CodeWithMe
Keywords and Identifiers
Identifiers:
Identifiers are the names given to various program elements
such as constants,
variables, function names and arrays etc. Every element in
the program has its own
distinct name but one cannot select any name unless it
conforms to valid name in C
language. Let us study first the rules to define names or
identifiers.
Identifiers are defined according to the following rules:
1. It consists of letters and digits.
2. First character must be an alphabet or underscore.
3. Both upper and lower cases are allowed. But each a word
in different case will be teated different example. Hello and hello will be
different.
4. Except the special character underscore ( _ ), no other
special symbols can be
used.
Keywords In C language
Keywords are reserved words which have standard, predefined
meaning in C. They
cannot be used as program-defined identifiers. There 32 keywords in C Here is the list of keywords :
- do
- while
- char
- typedef
- auto
- case
- switch
- else
- if
- int
- printf
- double
- struct
- break
- static
- long
- enum
- register
- extern
- return
- union
- const
- float short
- unsigned
- continue
- for
- signed
- void
- default
- goto
- sizeof
- volatile
Escape Characters :
- you cannot otherwise write (such as \n)
- that can be difficult to read properly (such as \t)
Post a Comment