Monday 29 February 2016

Print ASCII table

Q. Write a C program to print the ASCII table with numbers and corresponding characters.
or
Q. Write a C program to print the ASCII values 0 to 255 with numbers and related value.

Ans.

/*c program to print all ASCII table and its equivalent values with numbering*/
#include<stdio.h>
#include<conio.h>
int main()
{
 int i;
 printf("ASCII table & its equivalent values with numbering: \n");
 for(i=1; i<=255; i++)
   printf("\nValue: %d -> ASCII character: %c",i,i);
 getch();
 return 0;

}


No comments:

Post a Comment

Ads Inside Post