Ticker

6/recent/ticker-posts

Identifiers

Identifiers - 

Image result for identifiers in c

Identifiers are used in C language to assign a variable. An identifier is a string of alphanumeric characters that begins with an alphabetic character or an underscore character that are used to represent various programming elements such as variables, functions, arrays, structures, unions and so on.


Rules for Identifiers - 
  1. An Identifier can only have alpha numeric values (A-Z);(a-z);(0-9) and underscore (_).
  2. An Identifier should only start with alphabet or an underscore.
  3. It is case sensitive. (eg. - name and NAME is different ) 
  4. Keywords can't be used as identifiers.
  5. No special characters such as semicolon,period or white spaces are allowed in the identifiers.
For example - 
int variable1 = "Beginner programmer";
Here variable1 is the identifier. It contains the value "Beginner programmer"..

Post a Comment

0 Comments