main()
{
int (*functable[2])(char *format, ...) ={printf, scanf};
int i = 100;
(*functable[0])("%d", i);
(*functable[1])("%d", i);
(*functable[1])("%d", i);
(*functable[0])("%d", &i);
}
a. 100, Runtime error.
b. 100, Random number, Random number, Random number.
c. Compile error
d. 100, Random number
Answer / vishnu kant gupta
a is correct.
because it should be -
(*functable[0])("%d", i);
(*functable[1])("%d", &i);
(*functable[1])("%d", &i);
(*functable[0])("%d", i);
Is This Answer Correct ? | 29 Yes | 6 No |
#define prod(a,b) a*b main() { int x=3,y=4; printf("%d",prod(x+2,y-1)); }
Write a program to model an exploding firecracker in the xy plane using a particle system
code of a program in c language that ask a number and print its decremented and incremented number.. sample output: input number : 3 321123
int a=1; printf("%d %d %d",a++,a++,a); need o/p in 'c' and what explanation too
create a C-code that will display the total fare of a passenger of a taxi if the driver press enter,the timer will stop. Every 10 counts is 2 pesos. Initial value is 25.00
main() { printf("\nab"); printf("\bsi"); printf("\rha"); }
What are the following notations of defining functions known as? i. int abc(int a,float b) { /* some code */ } ii. int abc(a,b) int a; float b; { /* some code*/ }
what is the output of the below program & why ? #include<stdio.h> void main() { int a=10,b=20,c=30; printf("%d",scanf("%d%d%d",&a,&b,&c)); }
#include <stdio.h> #define a 10 main() { #define a 50 printf("%d",a); }
write a program in c language to get the value of arroy keys pressed and display the message which arrow key is pressed?
main() { int i = 100; clrscr(); printf("%d", sizeof(sizeof(i))); } a. 2 b. 100 c. 4 d. none of the above
#define clrscr() 100 main() { clrscr(); printf("%d\n",clrscr()); }