Saturday, January 30, 2010

CHAP 3[B]d Printing ASCII characters using while loop

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.

void main()
{
int x;
x=0;
while(x<=255)
{
printf("\nASCII value %d Character %c",x,x);
x++;
}
}

No comments:

Post a Comment