char to int c

C
//You can cast the character like this
int(mychar)
Source

Also in C: