C++ Program to Print ASCII Value

C++ Program to Print 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;
}

Result

C++ Program to Print ASCII Value
C++ Program to Print ASCII Value

Leave a Comment