C++ Program to convert ASCII value to the character. | C ++ प्रोग्राम को ASCII मान को वर्ण में बदलने के लिए।






















C++ Program to convert ASCII value to the character.

In this example program to convert ASCII to the character. First, declare the int data type and convert the char data type. For example, 'int as' here int integer data type and 'as' a variable. The int variable converts into char (char (as)). The enter an ASCII value converted into character.






#include <iostream> using namespace std; int main() { int as; cout<<"Enter any ASCII value :"; cin>>as; cout<<"\n To convert ASCII to character :"<<char(as)<<endl; return 0; }

Output:

Enter any ASCII value:97 To convert ASCII to character: a Enter any ASCII value:65 To convert ASCII to character: A