C Program to find ASCII value of a character


In this program, You will learn how to find ASCII value of a character in c.


Characters is: A B C D

ASCII value: 65 66 67 68


Example: How to find ASCII value of a character in c

Run it Now
#include<stdio.h>

int main() {

   char ch;

   printf("Enter Any Character :");
   scanf("%c", &ch);

   printf("\nThe ASCII value is :%d", ch);

   return 0;
}

Output:

Enter Any Character :A
The ASCII value is :65