C plus plus code to Print Character using ASCII value

This article provides C plus plus source code to print character using ASCII value. It gets the ASCII value input from user and prints the corresponding character.

C++ Source code to print character from ASCII value

#include <iostream>
using namespace std;
int main()
{
 int asciiValue;
 //Input the ASCII value
 cout << "Enter ASCII value: ";
 // Read the ASCII value
 cin >> asciiValue;
 // Print character from ASCII value
 cout << "Character for ASCII Value of " << asciiValue << " is " << char(asciiValue);
 return 0;
}
Example output of printing character from ASCII value in C++

Also Check Print ASCII value of a character [C Plus Plus]

Resource: https://en.cppreference.com/w/cpp/language/ascii

About the Author

SRINI S

A passionate blogger. Love to share solutions and best practices on wordpress hosting, issues and fixes, excel VBA macros and other apps

Leave a Reply

Your email address will not be published. Required fields are marked *