Possible Duplicate:
How to read or capture Ctrl+some key or Alt+some key in C?
the code snippet :
char ks;
ks=getch(); // getting the keystroke : if non ascii then 2 bytes returned : 1st 0 then //scancode
if(ks==0) // if there's no ascii then get the scan code
ks=getch();
printf("%d",ks); // would print ascii if ks !=0 else scan code
//end
alt and control keys give no output while ctrl+e gives output as 5 . I dont get it , please explain .