Character Set in C language | all available characters in C language
Character Set in C – Introduction:
In our previous article, We have discussed about the Hello World Program in C Language. Now in this article, We will discuss about the Character Set in C language.
Character Set in C Language:
The C Language have basic character set which includes the Alphabets, Digits, Special Characters, and Escape Sequences, etc.
So Lets discuss above them one by one.
Alphabets :
C-Programming language support all the 52 upper and lower case characters of Alphabets.
Here are the list of alphabets
Upper-case alphabets:
1 |
A,B,C,D..............Z |
Lower-case Alphabets:
1 |
a,b,c,d,................z |
Digits :
The ten decimal digits starting from zero upto the 9.
Digits:
1 |
0 1 2 3 4 5 6 7 8 9 |
Special Characters :
The C Programming Language supports 29 special characters like brackets (Curly brackets, Square brackets), Quotes, Hash, Question mark and so on. C language support most of the popular special charactersList of Special Characters in C Language:
Here are the list of special characters in C
1 2 3 4 5 |
! " # & ' ( ) * % + , - / . ; : < = > ? [ ^ ] - _ { } | ~ |
C Language also supports five White Space characters.
- Space
- Horizontal tab
- Vertical tab
- Newline
- Form feed.
Here is a program to print all available characters in C Language.
C Language Escape Sequences :
Escape sequences in programming is a special sequence of characters, which is used to escape the meaning of the sequence to give it a different meaning.
All C Language characters are printed on console but some Characters such as new line character, tab, question mark(?), backslash( \ ), etc. can not be printed like normal characters.
So How we print above characters. To print these characters we need to use Escape sequences.
An escape sequence always starts with the back-slash ( \ ) and is followed by one or more special characters.
For Example the new line in C Programming language printed by using '\n' Escape Character. This type character refers to a single character even though they are written as two characters. So they are called as the Escape sequences.
Here is the list of Escape Characters in C
Character | Escape Sequence | ASCII Value |
Back Space | \b | 08 |
Bell | \a | 07 |
Horizontal Tab | \t | 09 |
New Line | \n | 10 |
Vertical Tab | \v | 11 |
Form Feed | \f | 12 |
Carriage Return | \r | 13 |
Quotation Mark | \” | 34 |
Apostrophe | \’ | 039 |
Question Mark | \? | 063 |
Backslash | \\ | 092 |
NULL | 0 |
3 Responses
[…] more about the white spaces at the Character Set of C […]
[…] note that, The two strings also have the same case characters, As C is case sensitive language, The case mismatch will also result in to the un-equal […]
[…] Declare the two strings named str1 and str2 with SIZE size. ( i.e SIZE = 100 characters) […]