User defined words in a C Program is called Identifiers.

Identifiers are names given to variables and functions.

for example :
int mark=50;
mark is a user defined word that is a Identifier .

  • Rules for defining Identifier in C Langauge

    Identifiers are names given to variables and functions.

    • Identifiers can be a sequence of letters, digits or underscore '_' characters.

    • Identifier must not begin with a digit.

    • Identifiers in C are Case sensitive. So Total, total and TOTAL are all different.

    • Keywords can not be used as identifiers.

    • Special characters are not allowed ( #, -, +, % ).

    • Identifiers should improve the readability of the program by having meaningful names.

    • Try to avoid using identifiers that begin with an underscore character.

  • Example of Identifiers

    #include <stdio.h>
    #include <conio.h>
    void main()
    int myvariable;
    printf("value of my variable is %d",myvariable);
    value of my variable is 45

    In above example myvariable is a Identifier.

What next?

The next topic is Keywords in C

Share this page