+ 1

ASCII vaue

how do we print the ASCII value of a variable?

22nd Aug 2018, 4:29 AM
riya
riya - avatar
1 Resposta
0
In C++, the function int(n) (where n is the variable you wish to convert) will convert an integer to its ASCII value, so cout << int(a) would output 97, and cout << int(p) would output 112.
22nd Aug 2018, 5:24 AM
NULL
NULL - avatar