C++ Program to print character using ASCII value


In this program, You will learn how to print character using ASCII value in C++.


65 - A, 66 - B .....


Example: How to print character using ASCII value in C++

Run it Now
#include<iostream>
using namespace std;

int main() {

    int asc;
    cout << "Enter any ASCII value :";
    cin>>asc;

    cout << "\nCharacter value is :" << char(asc);

    return 0;
}

Output:

Enter any ASCII value :65
Character value is :A