2. Character set
C has its own Vocabulary and Grammar.
The Character that can be used to form words, numbers and expression
depend upon the Computer on which the program is run.
The Character in C are grouped into the following two categories:
Character Set
Source character set Execution character set
3. Source character set
The source character set are grouped into the following categories.
Source character set
Alphabets Digits Special character White space
Alphabets:
Alphabets are divided into two group in C language.
They are
Uppercase letter
Lowercase letter
4. Uppercase letter:
Alphabets ASCII Value
A 65
B 66
C 67
D 68
E 69
F 70
G 71
H 72
I 73
J 74
K 75
L 76
M 77
N 78
O 79
P 80
Q 81
R 82
S 83
T 84
U 85
V 86
W 87
X 88
Y 89
Z 90
5. Lowercase letter:
Alphabets ASCII Value
a 97
b 98
c 99
d 100
e 101
f 102
g 103
h 104
i 105
j 106
k 107
l 108
m 109
n 110
o 111
p 112
q 113
r 114
s 115
t 116
u 117
v 118
w 119
x 120
y 121
z 122
7. Special characters:
Special character ASCII Value Character represented
! 32 Exclamation mark
” 34 Quotation mark
# 35 Number sign
$ 36 Dollar Sign
% 37 Percent sign
& 38 Ampersand
( 40 Left parenthesis
) 41 Right parenthesis
* 42 Asterisk
+ 43 Plus sign
8. Cont.….
, 44 Comma
- 45 Mins sign
. 46 Period
/ 47 Slash
: 58 Colon
; 59 Semicolon
< 60 Opening angle bracket (or)
less then sign
= 61 Equal sign
> 62 Closing angle bracket (or)
Greater than sign
? 63 Question mark
9. Cont.….
@ 64 at symbol
[ 91 Left bracket
92 Black slash
] 93 Right bracket
^ 94 Caret
_ 95 Under score
{ 123 Left brace
| 124 Vertical bar
} 125 Right brace
~ 126 Tilde
10. Whitespace character:
Constant Character represented
b Blank space
Back slash
n New line
f Form feed
0 Null
v Vertical tab
t Horizontal tab
’ Single quote
r Carriage return
a Alarm(bell)
? Question mark
11. Execution character set:
• Certain ASCII character are unprintable which means they are not displayed on
the screen or printer.
• Those character performed other function aside from displaying text.
Examples are
backspacing
moving to a newline or
ringing a bell
they are used in output statements.
• Execution character set are always represented by a combination of backslash()
followed by a character.
• These characters combination are called as Escape sequence.
12. Escape sequence:
Escape sequence ASCII Value Character represented
0 00 Null
a 07 Alarm (Beep Bell)
b 08 Back space
t 09 Horizontal tab
n 10 New line
v 11 Vertical tab
f 12 Form feed
r 13 Carriage return
’’ 34 Double quote
’ 39 Single quote
? 63 Question mark
92 Black slash