Convert char to int in C and C++ - Stack Overflow

PHOTO EMBED

Tue Jan 18 2022 03:26:32 GMT+0000 (Coordinated Universal Time)

Saved by @Narutu #c++

char a = 'a';
int ia = (int)a; 
/* note that the int cast is not necessary -- int ia = a would suffice */
content_copyCOPY

For the test work

https://stackoverflow.com/questions/5029840/convert-char-to-int-in-c-and-c