C – Tokens

C – Tokens 2017-08-05T14:02:03+00:00

C Tokens :

The smallest individual elements or units in a program are called as Tokens. C has following tokens.

  • Identifiers
  • Keywords
  • Constants
  • Operators
  • Special characters

Identifiers :

Identifiers in c refer to the name of the variables, functions, arrays,etc. created by the  programmer, using the combination of following characters.

  • Alphabets :     A to Z     (or)    a to z
  • Digits :     0 to 9
  • Underscore :      _

 Note :

  • . The first character of an identifier must be an alphabet or underscore ,we canot use digit.
  • . Default identifier length is 32 characters.

Identifiers are explained briefly here

Keywords :

Keywords are the words whose meaning has been already explained by the compiler. That means at the time of designing a language, some words are reserved to do  specific tasks. Such words are called as keywords (or) reserved words. All C compilers support 32 keywords.

Keywords are explained briefly here

Constants :

Constants define fixed values, that do not change during the execution of a program. C supports the following constants.

  • Integer constants
  • Character constants
  • Real or floating constants
  • String constants

Constants are explained here

Operators:

Operator  is a symbol which performs particular operation. C supports a rich set of operators. C operators can be classified into No of categories. They include arithmetic operators, logical operators, bitwise operators, etc.

Operators are explained briefly here

Special characters:

All characters other than alphabets and digits  are treated as special characters.

Eg:   * , % , $ , {  ,etc.

 

 

 

Prev Next