C Identifiers

Identifiers

An Identifiers are names given to various program elements, such as variable, functions and array identifiers consist of letters(a-z, A-Z) and digits(0-9), in any order, expect that the first character must be a letter.

The underscore character(_) can also be include. An Identifier may also beigin with an underscor.

C Identifiers are case-sensitive.

Rules for Naming Identifiers

  • The first character in an identifier must be an alphabet or an underscore and can be followed only by any number alphabets, or digits or underscores.
  • They must not begin with a digit.
  • Uppercase and lowercase letters are distinct. That is, identifiers are case sensitive.
  • Commas or blank spaces are not allowed within an identifier.
  • Keywords cannot be used as an identifier.
  • Identifiers should not be of length more than 31 characters.
  • Identifiers must be meaningful, short, quickly and easily typed and easily read.
  								
 X 	Y12 	sum_1 	_temprature 	name 	area 	tax_rate 	TABLE
 


Keywords

There are certain reserved words, called keywords, that have standard, predefined meanings in C.

Keywords are pre-defined words in a C compiler. Each keyword is meant to perform a specific function in a C program.

Since keywords are referred as a name for compiler, they can’t be used as variable name because it has standard predefined specific meaning. Keywords should be written in lower case

In C programming around 32 words have been reserved as the keywords.

The meaning and working of these keywords are already known to the compiler and therefore, it can not be changed or modified.

Given bellow is a list of the standard 32 Keywords in C Programming Language.

keyword keyword keyword keyword
auto double int struct
break else long switch
case enum register typedef
char extern return union
const float short unsigned
continue for signed void
default goto sizeof volatile
do if static while