To enter any ASCII value and display its character

 Program:

#include<stdio.h>
#include<conio.h>
void main()
{
    int n;
    clrscr();
    printf("Enter any ASCII Value from 0 to 255 : ");
    scanf("%d", &n);
    printf("Character of Given ASCII Value is : %c", n);
    getch();
}

Output:

Enter any ASCII Value from 0 to 255    : 65

Character of Given ASCII Value is        :  A

 

No comments:

Post a Comment