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