Identifiers and Keywords:


Identifiers are names given to various program elements, such as variables, functions and arrays. They may consist of a letter or a digit or both except that the first character must be a letter. Since C is case- sensitive so both uppercase and lowercase letters can be used as both have different meaning. The (_) underscore can also be included. An underscore is often in the middle of an identifier. The common usage favors the use of lowercase letters for most types of identifiers.
For example: a, area, sum, a_sum etc. are all valid identifiers as they all satisfy the conditions of valid identifiers.
However, 5th, bal- acc, “a” all invalid identifiers.



Keywords are the words whose meaning has already been explained to the C compiler (or in a broad sense to the computer). The keywords cannot be used as variable names because if we do so, we are trying to assign a new meaning to the keyword, which is not allowed by the computer. There are only 32 keywords in C. They are given below:

Previous                                                                                     Next

Powered by Blogger.