Program to Print
ASCII equivalent of a character until terminated by key is ‘x’
Program
#include<stdio.h>
#include<conio.h>
void main()
{
char ch;
clrscr();
printf("Now
Enter the Data. To Stop Press 'x'.\n\n");
while((ch = getch())
!= 'x')
printf("The
ASCII Value of %c is %d\n", ch, ch);
}
No comments:
Post a Comment