Quick Contact


    C keywords and Identifier

    The keywords are the predefined reserved words that are used in the particular programming language. These reserve words or keywords have some special meaning to the compiler.

    These predefined words cannot be used as the Identifier in any language. The keywords and identifiers are also known as tokens of the C programming language.

    C keywords and Identifier

    Figure: C programming language Tokens

    Keywords in C programming language

    We have 32 general keywords or reserved words in the C programming language. We cannot use the keyword as the variable name, constant name etc. The meaning of keywords has been explained in the C language library because these words are inbuild and already reserved for the particular type of data.

    When we use the keywords as identifiers or variables, then it is not permitted by the computer because we are trying to assign a new meaning to that particular reserved word.

    Example:
    int salary = 5000;

    In the above example, int is the reserved word to the integer value, and salary is the variable that can store integer type of value or data to perform several operations.

    There are some important keywords of C language, which are given below:

    C keywords and Identifier

    Figure: keywords in C programming language.

    Identifiers in C

    The Identifier refers to that particular name that is given to the entities in any program or code. These entities can be structures, unions, variables, and functions. The identifiers must be single in the entire code or program.

    C keywords and Identifier

    Figure: Identifier in C programming language.

    Example of Identifier:
    int employee;

    the employee is the Identifier in the above example, which is not a keyword but can be a variable and store some data or value.

    Naming rules for particular Identifier in C

    There are some rules for naming the particular Identifier in C language, which is given below:

    • The initial letter of an identifier can be a letter or underscore.
    • Any valid identifier includes digits, letters in both cases uppercase and lowercase, and underscore in the particular program.
    • We don’t have any rule to the length of an identifier at the declaration time. The initial 31 characters of the particular Identifier is significant by the compiler.
    • The Identifier is never used as the keyword in the code, but it can be used as the variable.

    Copyright 1999- Ducat Creative, All rights reserved.