C Keywords and Identifiers
C Keywords and Identifiers
Character set
A character set is a set of alphabets, letters and some special characters that are valid
in C language.
Alphabets
Uppercase: A B C ................................... X Y Z
Lowercase: a b c ...................................... x y z
Digits
0 1 2 3 4 5 6 7 8 9
Special Characters
, < > . _
( ) ; $ :
% [ ] # ?
^ ! * / |
- \ ~ +
Blank space, newline, horizontal tab, carriage, return and form feed.
C Keywords
Keywords are predefined, reserved words used in programming that have special
meanings to the compiler. Keywords are part of the syntax and they cannot be used as
an identifier. For example:
1. int money;
Here, int is a keyword that indicates money is a variable of type int (integer).
doubl
auto e int struct
registe
case enum r typedef
exter
char n return union
continu
e for signed void
do if static while
volatil
default goto sizeof e
unsigne
const float short d
C Keywords
C Identifiers
Identifier refers to name given to entities such as variables, functions, structures etc.
Identifiers must be unique. They are created to give a unique name to an entity to
identify it during the execution of the program. For example:
1. int money;
2. double accountBalance;
Here, money and accountBalance are identifiers.
Also remember, identifier names must be different from keywords. You cannot
use int as an identifier because int is a keyword.