write a program in c language to get the value of arroy
keys pressed and display the message which arrow key is
pressed?
Answer / mohamed ziavudeen
#define KBHOME 327
#define KBEND 335
#define KBUP 328
#define KBDOWN 336
#define KBPGUP 329
#define KBPGDN 337
#define KBLEFT 331
#define KBINS 338
#define KBRIGHT 333
#define KBDEL 339
c0 = getch();
if (c0==0) {
c1=getch()+256;
if (c1==KBUP)
{
printf("You had hit the upper arrow key");
else if (c1==KBDOWN)
printf("You had hit the DOWN arrow key");
else if (c1==KBLEFT)
printf("You had hit the LEFT arrow key");
else if(c1==KBRIGHT)
printf("You had hit the RIGHT arrow key");
else
printf("You had hit some other key");
}
}
| Is This Answer Correct ? | 1 Yes | 2 No |
main() { extern i; printf("%d\n",i); { int i=20; printf("%d\n",i); } }
main() { char *p; printf("%d %d ",sizeof(*p),sizeof(p)); }
write a c-program to find gcd using recursive functions
can u give me the c codings for converting a string into the hexa decimal form......
main() { char not; not=!2; printf("%d",not); }
create a login program that ask username and password. if you input username or password 3 times wrong, the program will terminate else the program will prompt a message "congratulations"
main() { int i=10,j=20; j = i, j?(i,j)?i:j:j; printf("%d %d",i,j); }
why is printf("%d %d %d",i++,--i,i--);
void main() { char ch; for(ch=0;ch<=127;ch++) printf(ā%c %d \nā, ch, ch); }
how can i search an element in an array
2 Answers CTS, Microsoft, ViPrak,
find simple interest & compund interest
main() { int y; scanf("%d",&y); // input given is 2000 if( (y%4==0 && y%100 != 0) || y%100 == 0 ) printf("%d is a leap year"); else printf("%d is not a leap year"); }