C Online Compiler
Example: C program to find the ASCII value of a character
C
C++
C#
Java
Python
PHP
main.c
STDIN
Run
// 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; }
h
Output
Clear
ADVERTISEMENTS