Friday, June 13, 2008

Print all ASCII values (0-255) characters

/*Write a prog to print all the ascii values and their equivalent char using while loop.Ascii values vary from 0 to 255 */

Solution  Code :-
=============


#include <stdio.h>

int main(void)
{
int i = 0 ;
while ( i <= 255 )
{
printf ( " %d represents character %c \n",i,i);
i = i++ ;
}

}

No comments: