Program in C to print ASCII code from 0 to 255

Write a program in C to print ASCII code from 0 to 255

#include<stdio.h>
#include<conio.h>
#include<math.h>

void main ()
{
          int i=0,count=0;
          clrscr ();
          for(i=0;i<=255;i++)
          {
                   if (count>24)
                   {
                             count=0;getch();
                   }
                   else
                   {
                             printf("%d=%c\n",i,i);
                             count++;
                   }
          }
          getch ();
}


Post a Comment