6.c++ program to get an ASCII value and display the corresponding character


 // C++ program to get an ASCII value and display the corresponding character


#include<iostream>

using namespace std;

int main()

{

    int a;

    char b;

    cout<<"\n Enter ASCII code (0 to 255):";

    cin>>a;

    b=a;

    cout<<"\n Equivalent Character:"<<b<<endl;

}


OUTPUT:





Comments