Ticker

6/recent/ticker-posts

C Identifiers - Character Set, Keyword

Character set 

A character denotes any alphabet, digit or special symbol used to represent information. Valid alphabets, numbers and special symbols allowed in C are

Character Set

The alphabets, numbers and special symbols when properly combined form constants, variables and keywords. 

Identifiers 

Identifiers are user defined word used to name of entities like variables, arrays, functions, structures etc. Rules for naming identifiers are: 

  1. name should only consists of alphabets (both upper and lower case), digits and underscore (_) sign. 
  2. first characters should be alphabet or underscore 
  3. name should not be a keyword 
  4. since C is a case sensitive, the upper case and lower case considered differently, for example code, Code, CODE etc. are different identifiers. 
  5. identifiers are generally given in some meaningful name such as value, net_salary, age, data etc. An identifier name may be long, some implementation recognizes only first eight characters, most recognize 31 characters. ANSI standard compiler recognize 31 characters. Some invalid identifiers are 5cb, int, res#, avg no etc.

Keyword

There are certain words reserved for doing specific task, these words are known as reserved word or keywords. These words are predefined and always written in lower case or small letter. These keywords cann’t be used as a variable name as it assigned with fixed meaning. Some examples are int, short, signed, unsigned, default, volatile, float, long, double, break, continue, typedef, static, do, for, union, return, while, do, extern, register, enum, case, goto, struct, char, auto, const etc.

ALSO SEARCH:

"c identifiers character set keywords example"

"c identifiers character set keywords in c"

"c character set identifiers and keywords"

"what is keyword and identifier in c"

"special characters key code"

"character identifier in c"

"what is character identification"

"what characters are allowed in c function name identifier"