cómo transformar un char al código ASCII en c

int a_as_int = (int) 'a';
Jolly Jay