View Single Post
Old 15-01-2007, 02:54 PM   #9 (permalink)
n2casey
Super Hero - Super Powers
 
n2casey's Avatar
 
Join Date: Sep 2006
Location: Dynamic
Posts: 766
Exclamation Re: ASCII Code confusion

Quote:
Originally Posted by ahref
void main()
{
char x,y,z;
clrscr();
printf("Press any key");
x=getch();

if(x==0)
{
y=getch();
printf("\a");
printf("\nExtended Ascii code is %d",y);
}
else
{
printf("\nAscii Code is %d",x);
}
getch();
}
I have tried that but still problem not solved coz the statement
Code:
if(x==0)
{
y=getch();
printf("\a");
printf("\nExtended Ascii code is %d",y);
}
never gets executed. Every time I press F1, F2 etc. then first statement is executed & it prints Ascii Code is ...
__________________
Minds are like Parachutes :arrow: They work best when open
n2casey is offline