Thursday, January 20, 2011

Write a program to print all the ASCII values and their equivalent characters using a while loop. The ASCII values vary from 0 to 255.

#include<stdio.h>
main()
{
int num;

printf("Printing ASCII values Table...\n\n");

num = 1;

while(num<=255)

{

printf("\nValue:%d = ASCII Character:%c", num, num); /*This change has been made as per the comment. Thank you anonymous Blog Viewer ... */

num++;
}

printf("\n\nEND\n");

}

No comments:

Post a Comment