This is a C++ Program to Display the ASCII Value of the Character Entered.
The program takes a character and prints its ASCII value. ASCII stands for American Standard Code for Information Interchange which is a numerical representation of characters in computers ranging from 0 to 127.
1. A character is entered.
2. The equivalent ASCII value of the character is printed.
C++ Program/Source code
Here is the source code of C++ Program to Display the ASCII Value of the Character Entered. The program output is shown below.
using namespace std;
int main ()
cout << "Enter a character : "; cin >> c;
cout << "ASCII value of " << c <<" is : " << (int)c; return 0; } Runtime Test Cases Case 1 : Enter a character : M ASCII value of M is : 77 Case 2 : Enter a character : a ASCII value of a is : 97 Case 3 : Enter a character : S ASCII value of S is : 83