C Tutorials - Character Set in C Programming Language

C Character Set

As every language contains a set of characters used to construct words, statements, etc., C language also has a set of characters which include alphabets, digits, and special symbols. C language supports a total of 256 characters.

Every C program contains statements. These statements are constructed using words and these words are constructed using characters from C character set. C language character set contains the following set of characters...
  1. Alphabets
  2. Digits
  3. Special Symbols

Alphabets

C language supports all the alphabets from the English language. Lower and upper case letters together support 52 alphabets.
lower case letters - a to z
UPPER CASE LETTERS - A to Z

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

Special Symbols

C language supports a rich set of special symbols that include symbols to perform mathematical operations, to check conditions, white spaces, backspaces, and other special symbols.
Special Symbols - ~ @ # $ % ^ & * ( ) _ - + = { } [ ] ; : ' " / ? . > , < \ | tab newline space NULL bell backspace verticaltab etc.,

Commonly used characters in C with thier ASCII values

dennis ritchie, father of c, father of unix

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;
}

Post a Comment

Thanks for comment.

Previous Post Next Post