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.

Author: Tanmay Chakrabarty

Tanmay Chakrabarty is a former CSE student, currently working as a Senior Software Engineer with 5+ years of experience in the field of Web Application development in PHP+MySQL platform with strong skills in Javascript, JQuery, JQuery UI and CSS. He tries to write notes every week but fails due to heavy loads of duty.

Recommended Recommends


Contact Us