The C character set

character set in c

C character set

A character set in C Programming Language is set of all valid character which is used to form a words, numbers and expression’s in source program.

The character set is fundamental raw material of any language and they are used to represent information like natural language, computer language will also have well defined Character set, that is useful to build the programs.

Now, in this section we learn about the type of the Character set and discuss about all type of it in brief.

Type of C character set

There are four type of character set in C programming.

  • Alphabets 
  • Digit
  • Special Character 
  • White space
character

Alphabets

Alphabets has a two case.
  1. Upper case   A-Z
  2. Lower case   a-z.
In C programming, small letters and capital letters are distinct.

Alphabets

ASCII Code

Alphabets

ASCII Code

A 65 a 97
B 66 b 98
C 67 c 99
D 68 d 100
E 69 e 101
F 70 f 102
G 71 g 103
H 72 h 104
I 73 i 105
J 74 j 106
K 75 k 107
L 76 l 108
M 77 m 109
N 78 n 110
O 79 o 111
P 80 p 112
Q 81 q 113
R 82 r 114
S 83 s 115
T 84 t 116
U 85 u 117
V 86 v 118
W 87 w 119
X 88 x 120
Y 89 y 121
Z 90 z 122

Digit

C programming support 10 digit which are used to construct numerical value.
  • Digit 0-9.

Alphabets

ASCII Code

0 48
1 49
2 50
3 51
4 52
5 53
6 54
7 55
8 56
9 57

Special character

C programming supports set of special symbols that include symbols to perform mathematical operation, check condition and other special symbol.
  • Special character %,&,*,etc.

Special Character

ASCII Code

Special Character

ASCII Code

~ 126 45
! 33 _ 95
@ 64 + 43
# 35 = 61
$ 36 { 123
% 37 } 125
& 38 | 124
* 42 \ 92
( 40 ; 58
) 41 : 59
39 / 47
34 ? 63
< 60 > 62

White space

In computer programming,  white space is a character that represent vertical space in typography.
  • White space \b,\v,\? and so on.

White Space

Meaning

White Space

Meaning

\b blank space \\ back slash
\t horizontal tab \’ single quote
\v vertical tab \” double quote
\r carriage return \? Question mark
\f form feed \0 null
\n new line \a alarm (bell)

Prime Course Trailer

Related Banners

Get PrepInsta Prime & get Access to all 200+ courses offered by PrepInsta in One Subscription

Get over 200+ course One Subscription

Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others

Checkout list of all the video courses in PrepInsta Prime Subscription

Checkout list of all the video courses in PrepInsta Prime Subscription