Written by Sai Sameera Thota on February 11, 2013 in C > Programming

C Program to Display ASCII Values

GET ALERTS:

Get our Latest updates delivered to your mailbox!

This program displays ASCII Values of each character. There are 256 ASCII Values, this program displays output page-wise. if((i+1) % 20 == 0) is used to define page length.

#include<stdio.h>
#include<conio.h>
main()
{
      int i;
      for(i=0;i<255;i++)
      {
			printf("%c - %d \n", i, i);
			if((i+1) % 20 == 0)
			{
				 printf("Press any key to continue \n");
				 getch();
				 clrscr();
			}
      }
      return 0;
}

Output:

{ 1 comment… read it below or add one }

Nicholas October 18, 2013 at 12:34 pm

When someone writes an post he/she retains the idea of a
user in his/her mind that how a user can be aware of it.

Thus that’s why this article is perfect. Thanks!

Reply

Leave a Comment

Previous post:

Next post: