web analytics

What is keyword and identifier ? What are the rules for identifier?


Keywords have fixed meanings and these meanings can not be changed. There are 32 keywords. Some compiler may use additional keywords that must be identified from the C manual. Keywords serve as basic building block for a program statement.

Such as, autobreakdouble etc. All keyword must be written in lowercase.


The names of variables, functions and arrays are identifiers. These are user-defined names and consist of a sequence of letters and digits. Such as, my_num, _ton etc.

Rules for identifier:

  1. Must consist of only letters, digits and underscores.
  2. First character must be an alphabet or underscore.
  3. Only first 31 characters are significant.
  4. Can not use a keyword.
  5. Must not contain white spaces.
Scroll to Top