Friday 10 June 2016

Print characters for corresponding ascii values

This program prints the characters for corresponding ascii values.
#include<stdio.h>

int main()
{
    int i;
    for(i=0;i<=255;i++)
    {
        printf("\n%c %d",i,i);

        if(i%10==0&&i!=0)
            getch();
    }

        return 0;
}
getch() holds the screen till a character is pressed.

No comments:

Post a Comment