Answer to Question #57378 in C++ for Sajid

Question #57378
Q.write a program which accepts a character and display its ASCII value.
1
Expert's answer
2016-01-20T07:19:33-0500
#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;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS