You are on page 1of 4

Directions : Select the alternative which can best replace the highlighted phrase or word.

She was always harping on how wonderful her daughter was a. b. c. d. gushing singing songs of praise out emphasising keen to point out

If 4 men do a work in 12 days and 6 women do the same work in same time, how long it would take if 6 men and 9 women are involved? a. b. c. d. e. Predict the output for the following code. float *p; float f = p; printf(%f,&x); return; } a. b. c. d. Prints 10 Prints address of 10 Doesn't print anything Gives an error 8 days 4 days 2 days 9 days 6 days

void main(){ int n = 1; printf("%d",n--); printf(" %d",n); return; }

a. b. c.

10 11 00

d.

01

void main() { char *s="12345s"; printf("%d",sizeof(s)); }

a. b. c. d.

5 4 3 2

main() { int Y=10; if( Y++>9 && Y++!=10 && Y++>11) printf("%d", Y); else printf("%d", Y); } What is the output of the program?

a. b. c. d.

10 11 12 13

void main() { float j; j=2000*1000; printf("%f",j); }

a. b. c. d.

2000000 Overflow Error None

#include<iostream.h>

int main() { double result; int whole_number = 7; result= whole_number/2; cout<<"\n the result of the division is " <<result; return 0; }

a. b. c. d.

3 3.5 3 3.4

void main() { int d=3; printf("%f",d); }

a. b. c. d.

3 3.0 Undefined 0

main() { static int i=2; printf("%d",i--); return i>0 ? main():0; }

a. b. c. d.

21 210 0 120

main() { int i=0; for(i=0;i<20;i++) { switch(i)

{ case 0:i+=5; case 1:i+=2; case 5:i+=5; default i+=4; break; } printf("%d,",i); } }

a. b. c. d.

0,5,9,13,17 12,17,22 16,21 Syntax error

What will be the result of the following program?


char *gxxx() { static char xxx[1024]; return xxx; } main() { char *g="string"; strcpy(gxxx(),g); g = gxxx(); strcpy(g,"oldstring"); printf("The string is : %s",gxxx()); }

a. b. c. d.

The string is : string The string is :Oldstring Run time error/Core dump Syntax error during compilation

You might also like