Programming in C: Unit I (b): Introduction to C

Character Set in C

C Program

Like in natural languages, computer languages also use a character set that defines the fundamental units used to represent information.

CHARACTER SET IN C

Like in natural languages, computer languages also use a character set that defines the fundamental units used to represent information. In C, a character means any letter from English alphabet, digit or special symbol used to represent information. These characters when combined together form tokens that act as basic building blocks of a C program. The character set of C can therefore be given as:

a. English alphabet: Include both lower case (a - z) as well as upper case (A - Z) letters

b. Digits: Include numerical digits from 0 to 9

c. Special characters: Include symbols such as ~, @, , ^,&, *, {, }, <. >, =,_,+,-,$, /, (, ), \, ;,:,[, ],’,”,?,.,!,.

d. White space characters: These characters are used to print a blank space on the screen. They are shown in Figure 2.8.

e. Escape sequence: Escape sequences have already been discussed in section 2.3. They include \\, \', \", \n, \a, \0, \?.


Programming in C: Unit I (b): Introduction to C : Tag: : C Program - Character Set in C