The set of characters that can be used to write the C programs is called the character set of C.
The character set of C language is divided into four categories:
- Letters
- Digits
- Special Characters
- White Spaces
Character Set of C Language
Following are the characters that can be used to write C programs.
Letters
- Uppercase (A-Z) letters.
- Lowercase (a-z) letters.
Digits
The set of decimal digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9.
Special Characters
& ampersand
^ caret
* asterisk
– minus sign
+ plus sign
< opening angle bracket (or less than sign)
> closing angle bracket (or greater than sign)
( left parenthesis
) right parenthesis
[ left bracket
] right bracket
{ left brace
} right brace
# number sign
, comma
. period
; semicolon
: colon
? question mark
‘ apostrophe
“ quotation mark
! exclamation mark
| vertical bar
/ slash
\ backslash
~ tilde
_ underscore
$ dollar sign
% percent sign
White Spaces
- Blank Spaces
- Horizontal Tab
- Carriage Return
- New Line
- Form Feed
If you are programming with C language, your program code must not contain any characters that are not in this list.