What are C-Tokens? List and define different C-Tokens with examples.

1 year ago
C Programming

A C-Token is a smallest element of a C program. One or more characters are grouped in sequence to form meaningful words. These meaningful words are called C-Tokens.

The tokens are broadly classified as follows


  • Keywords: Keywords are tokens which are used for their intended purpose only. Each keyword has fixed meaning or predefined meaning and that cannot be changed by user. Hence, they are also called as reserved-words.

         ex: if, for, while, int, float, break, char ..etc.

  • Identifiers: As the name indicates, identifier is used to identify various elements of program such as variables, constants, functions, arrays etc.

         ex: sum, length, etc.

  • Constants: A constant is an identifier whose value remains fixed throughout the execution of the program. The constants cannot be modified in the

         ex: 10, 10.5, 'a', "sri", etc.

  • Operators: An operator can be any symbol like + - * / that specifies what operation need to be performed on the data.

         For ex: + indicates addition operation

       * indicates multiplication operation

       / indicates division operation, etc.

  • Special symbols: The symbols that are used to indicate array subscript, function call, block,

         ex: [], (), {}, etc.

Sanisha Maharjan
Jan 20, 2022
More related questions

Questions Bank

View all Questions