C Program Character to ASCII
/* Write a Program to which accepts a character from keyboard & display its ASCII code. */
#include <stdio.h>
int main(void) {
char ch;
printf("Enter any character : ");
scanf("%c",&ch);
printf("ASCII of %c is %d",ch,ch);
return 0;
}
#include <stdio.h>
int main(void) {
char ch;
printf("Enter any character : ");
scanf("%c",&ch);
printf("ASCII of %c is %d",ch,ch);
return 0;
}
Comments
Post a Comment