C identifiers

Identifiers refers to the name of user-defined variables, arrays and functions. A variable should be essentially a sequence of letters and or digits and the variable name should begin with a character or underscore ‘_’.

Now  question may come in your mind. what is variables, arrays and funtions? Answer of your these questions will be given in coming topics.

The identifiers must confirm to the following rules

  • First character must be an alphabet  or underscore.
  • Idetifier name must consist of only letter, digit and underscore.
  • An identifier name should have less than 31 characters.
  • Any standerd C language keywords can’t be used as a variable name.
  • An identifier should not contain a space.

Example :-
int          age;                 –> Variable (1)  (Here ‘age’ is identifier)

int          _money;          –> Variable (2)  (Here ‘_money’ is identifier)

char       alphabet_1;      –> Variable (3)   (Here ‘alphabet_1’ is identifier)

As we read above, Name of  user defined variable are identifiers.
So name of variable (1), (2) and (3) is called identifier.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.