Answer to Question #19366 in C++ for shamroz
write a program that display the ascii code of the enter char.
1
2012-11-26T05:58:27-0500
#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!
Learn more about our help with Assignments:
C++
Comments
Leave a comment