How to return the ASCII code value of a character in C?
thx..!
Printable View
How to return the ASCII code value of a character in C?
thx..!
char j = 'j';
printf("%d",j);
Like that?
The chars are stored as ASCII codes anyway, so just return it.
Hi!
The only difference between a char and an integer is that a char has in most cases a size of one byte and the integer two bytes.
klausi