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 <iostream>
using namespace std;
int main() {
char p;
cout << "Enter a character::\n";
cin >> p;
cout << "\nASCII value of " << p << " = " << int(p) << "\n";
return 0;
}
Output:
Enter a character::
h
ASCII value of h = 104