How to write a C Program to Print ASCII equivalent of a character until terminated by key is ‘x’ in C Programming Language ?
Solution:
#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);
}
You may also learn these C Program/Code :