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 |
void main() { static int i=5; if(--i){ main(); printf("%d ",i); } }
Extend the sutherland-hodgman clipping algorithm to clip three-dimensional planes against a regular paralleiepiped
respected sir, i did my MCA in 2013 when i am going to attend to an interview i was asked about my project how will i explain my project could please help me in this and my project title is "Social Networking Site For Social Responsibility"
why do you use macros? Explain a situation where you had to incorporate macros in your proc report? use a simple instream data example with code ?
write a program in c to merge two array
how to return a multiple value from a function?
main() { char *a = "Hello "; char *b = "World"; clrscr(); printf("%s", strcat(a,b)); } a. Hello b. Hello World c. HelloWorld d. None of the above
write a c program to print magic square of order n when n>3 and n is odd?
To Write a C program to remove the repeated characters in the entered expression or in entered characters(i.e) removing duplicates. String contains only lowercase characters ['a'-'z']
plz send me all data structure related programs
#define int char main() { int i=65; printf("sizeof(i)=%d",sizeof(i)); }
#define a 10 int main() { printf("%d..",a); foo(); printf("%d..",a); return 0; } void foo() { #undef a #define a 50 }