76 337
Assignments Done
Successfully Done
In May 2019

Answer to Question #19366 in C++ for shamroz

Question #19366
write a program that display the ascii code of the enter char.
Expert's answer
#include <iostream>
using namespace std;
int main()
unsigned char ucCharacter;
cin >> ucCharacter;
cout << hex << "0x" << (unsigned int)ucCharacter <<endl;
int iChNum;
cin >> hex >> iChNum;
cout << (unsigned char)iChNum <<endl;
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!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions