To do this you can cast the char to an int,
int charval = (int) mychar;
5
solved How to print a character code from char*? [closed]
To do this you can cast the char to an int,
int charval = (int) mychar;
5
solved How to print a character code from char*? [closed]