Identifiers in C
Identifiers refers to the name given to the entities such as variables, functions, structures etc. Identifiers must be unique. They are created to give unique name to the entity to identify it during the execution of the program.
For example:-
int money;
double account balance;
Here, money and account balance are identifiers.
Rules of writing identifiers
- First character must be an alphabet (or underscore)
- Identifier names must consists of only letters, digits and underscore.
- An identifier name should have less than 31 characters.
- Any standard C language keyword cannot be used as a variable name.
- An identifier should not contain a space.
Keywords in C-:
Key words are predefined, reserved words used in programming that have special meanings to the compiler. Keywords are the part of the syntax and they cannot be used as an identifier.
For example:- int money;
Here, int is the keyword that indicates money is a variable of the type integer.
The following are the Keyword set of C language.
Auto, else, register, union, break, enum, return, case, extern, unsigned, short, void, char, float, signed volatile, const, for, size of, while, continue goto, static, default, if, struct, do, int, switch, double, long, typedef
Post A Comment:
0 comments so far,add yours