this program will print all the ASCII characters from 0-255.But how this program works? Answer:If we want to Print Any ASCII character corresponding to any number then just put '\c' instead of '\n' while printing number.So it will print ASCII character instead of Number.For this program to print ASCII character corresponding to number then click here. But if you know then we proceed further,I have used for loop to count number and putted \c instead of \n while printing number.So at first value of n will be 0 so it will print ASCII character corresponding to number 0 and like this it will continue till number 255.So like this program works and prints all the ASCII characters.
Program:
#include<stdio.h>
#include<conio.h>
main()
{
int n;
clrscr();
for(n=0;n<=255;n++)
{
printf("%c ",n);
}
getch();
}
Program:
#include<stdio.h>
#include<conio.h>
main()
{
int n;
clrscr();
for(n=0;n<=255;n++)
{
printf("%c ",n);
}
getch();
}