A Program to Find ASCII Value
In this example, we are giving a program to find ASCII value for a given character. A character variable contains a value instead of that character itself in C Programming. This value is known as ASCII value.
Program to find the ASCII value:
#include <iostream>using namespace std;int main(){char c;cout("Enter a character: ";cin >> c;cout << "ASCII value of " << c << " is " << int(c);return 0;}
Output:
Enter a character: A ASCII value of A = 65