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