C program to find the ASCII value of a character
ADVERTISEMENTS
C program to find the ASCII value of a character. There are you will learn how to find the ASCII value of a character in the C language.
Let us understand this example through the C program:
// C program to find the ASCII value of a character
#include <stdio.h>
int main() {
char p;
printf("Enter a character::\n");
scanf("%c", &p);
printf("\nASCII value of %c = %d\n", p, p);
return 0;
}
Output:
Enter a character::
h
ASCII value of h = 104