Question #57378

Q.write a program which accepts a character and display its ASCII value.

Expert's answer

#include <iostream>
#include <cstdlib>

using namespace std;


int main() {

char c;
cout<<"Enter a character: ";
cin>>c;

cout << "Ascii value for the character: " << (int) c << endl;

system("pause");

return 0;
}
LATEST TUTORIALS
APPROVED BY CLIENTS