Identifiers in c

  • the first character should be alphabet or underscore
  • we can use _ (underscore) for starting alphabet
  • succeeding characters can be digits or alphabets
  • Only first 31 characters are significant.
  • A max 31 characters should be used.
  • Uppercase and lowercase identifiers are different
  • keywords are not used as identifiers
  • now two successive underscores are allowed
  • no special characters or symbols are allowed except underscore

Identifiers are names given to variables, functions, and arrays. There are some rules(above) for identifiers.these are user-defined names

Valid examples

  • var
  • _ex
  • _ri67
  • z

Invalid examples

  • :xe
  • 68iy
  • my var
  • #ty
  • 6.3