C Program to Generate ASCII Table

ASCII is abbreviated form for American Standard Code for Information Interchange.

Since computers can only understand numbers, so an ASCII code or value is Numeric representation of character such as 'a' or 'A' or '+' etc. Original ASCII code are of 7 bit long and Extended ASCII code are of 8 bit long.

ASCII Code Examples

  1. ASCII value of 'a' is 97, ASCII value of 'b' is 98, ..., ASCII value of 'z' is 122
  2. ASCII value of 'A' is 65, ASCII value of 'B' is 66, ..., ASCII value of 'Z' is 90
  3. ASCII value of '0' is 48, ASCII value of '1' is 49, ...., ASCII value of '9' is 57
  4. ASCII value of '+' is 43, ASCII value of '%' is 37, and so on.

In this C program, we are going to generate all character and their ASCII value.

Program


#include<stdio.h>
#include<conio.h>

int main()
{
	 int i;
	 clrscr();
	 for(i=0;i<=255;i++)
	 {
	  	printf("%d = %c\t",i,i);
	 }
	 
	 getch();
	 return(0);
}