In this chapter we will learn about Indetifiers and keywords in c.
Every programming language have some words that are reserved and have special purpose like int, switch, break etc. Those words are predefined and can not be used as an identifiers. These words are called as Keywords.
auto, double, int, struct, break, else, long, switch, case, enum, register, typedef, char, extern, return, union, continue, for, signed, void, do, if, static, while, default, goto, sizeof, volatile, const, float, short, unsigned
Identifiers are the name given to a variable, function, structure, union etc.Example of identifiers
int height; double distance;
Here height and distance are identifiers. int and double are keywords and can not be used as identifiers.
Keywords can not be used as identifiers.
Indentifiers must begin with a letter and can not start with a digit.
A valid Identifier can contains Alphabets(uppercase and lowercase), numbers and underscores.
Identifier can not contains special character except underscore(_)
int salary1, salary2; char name_of_first_president; float pi;Invalid Identifiers
int 1salary, 2salary; int salary*; char name&;
In the next chapter, we will learn about Operators.