C ++ ASCII value output
2 answers
There is no such thing as a variable that stores a hexadecimal value or decimal or octal value. Hex, octal, and decimal are just different ways of representing numbers to the compiler. The compiled code will represent everything in binary.
All of these statements have the exact same effect (assuming ASCII encoding):
test = 0x53; // hex
test = 'S'; // literal constant
test = 83; // decimal
test = 0123; // octal
So, print a character just like you would any character, no matter how you assign a value to it.
+5
source to share