C Character Set
C language has also a set of characters
as every language contains. Which include alphabets, digits and special
symbols. It supports a total of 256 characters.
Every C program contains statements. These can be constructed using words and also
constructed using characters from C character set. The following set of
characters is being used by C language character set:-
- Alphabets
- Digits
- Special Symbols
1) Alphabets
C language supports all the English alphabets{ a,b,c…..to z}and also {A,B,C,….Z} Lower and upper case letters respectively . Total 52 alphabets characters is supported by ‘C’,because ‘a’ and ‘A’ are different for ‘c’.
2) Digits
C language supports 10 digits which are used to construct numerical values in C language.
Digits – 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
3) Special Symbols
C language supports a huge set of special symbols that include symbols to perform mathematical operations, for checking conditions, white spaces, back spaces and any other special symbols.
Examples of some special symbols are :-
{- ~ @ # $ % ^ & * ( ) _ – + = { } [ ] ; : ‘ ” / ? . > , < \ | tab newline space NULL bell backspace vertical tab etc.,}
à Each and every character in C language has its equivalent ASCII (American Standard Code for Information Interchange) value.
Commonly used characters in C with their ASCII values are:-
C program to print all the characters of C character Set
#include<stdio.h>
#include<conio.h>
int main() {
int i;
clrscr();
printf(“ASCII ==> Character\n”);
for(i = -128; i <= 127; i++)
printf(“%d ==> %c\n”, i, i);
getch();
return 0;
}