Character set

Character set of the Language – In C programming language character set is made up of the following characters-

  • All characters from small a to z.
  • All characters from capital A to Z.
  • All numbers from 0 to 9.
  • All special characters like #, $, %, *, }, [ etc.

User Defined Words

User defined words are defined by the user by using some valid rules. These words can stand for variable name, file name, array name, function name etc.

Trigraph Character

Many non English keyboards do not support all the characters mentioned in table 2.1. ANSI C introduces the concept of “trigraph”  sequences to provide a way to enter certain characters that are not available on some keyboards. Teach trigraph sequence consists of three characters (two question marks followed by another character). Following is the the table to the Trigraph sequences –

Trigraph Sequences
Trigraph Sequence Translation
??( ‘ [ ‘ Left bracket
??) ‘ ] ‘ Right bracket
??< ‘ { ‘ Left Brace
??> ‘ { ‘ Right Brace
??! ‘ | ‘ Vertical Bar
??/ ‘ \ ‘ Back Slash
??/ ‘ ^ ‘ Cadet
??- ‘ ~ ‘ Tilde
??= ‘#’ Number sign

Keywords and Identifiers

Every C language word is classified as either a keyword or an identifier. All keywords have fixed meanings and these meanings cannot be changed. Keywords serve as basic building blocks for program statements.  All keywords must be written in lowercase. Some compilers may use additional keywords that must be identified from the C manual.

Some Keywords of C language
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


Identifiers refer to the names of variables, functions and arrays. These are user-defined names and consist of a sequence of letters and digits, with a letter as a first character. Both uppercase and lowercase letters are permitted, although lowercase letters are commonly used. The underscore character is also permitted in identifiers. It is usually used as a link between two words in long identifiers.

yashan has written 69 articles

One thought on “Character set

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>