Monday, September 1, 2014

print ASCII characters in c language 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.

Code

#include<stdio.h>
int main()
{
int i,x;
i=0;
while(i<=255)
{
printf("%c\t",i);
i=i+1;
}
system("pause");
return 0;
}

Sample Output

print ASCII characters in c language

No comments :

Post a Comment

Note: Only a member of this blog may post a comment.

Copyright 2017. All Rights Reserved. Privacy Policy / Terms And Conditions / Sitemap / Contact