Sail E0 Webinar

MCQs

Total Questions : 209 | Page 2 of 21 pages
Question 11. Determine Output:void main(){ int i=3; switch(i) { default: printf("zero"); case 1: printf("one"); break; case 2: printf("two"); break; case 3: printf("three"); break; }}
  1.    three
  2.    zero
  3.    None of These
  4.    Error
 Discuss Question
Answer: Option A. -> three
Question 12. Determine Output:#define int charvoid main(){ int i = 65; printf("sizeof(i)=%d", sizeof(i));}
  1.    Compiler Error
  2.    None of These
  3.    sizeof(i)=2
  4.    sizeof(i)=1
 Discuss Question
Answer: Option D. -> sizeof(i)=1
Question 13. Determine Output:void main(){ int i=5; printf("%d%d%d%d%d", i++, i--, ++i, --i, i);}
  1.    54544
  2.    45545
  3.    55445
  4.    54554
 Discuss Question
Answer: Option B. -> 45545
Question 14. Determine Output:void main(){ char string[]="Hello World"; display(string);}void display(char *string){ printf("%s", string);}
  1.    will print Hello World
  2.    Compiler Error
  3.    Can't Say
  4.    None of These
 Discuss Question
Answer: Option B. -> Compiler Error
Question 15. Determine Output:#define square(x) x*xvoid main(){ int i; i = 64/square(4); printf("%d", i);}
  1.    4
  2.    16
  3.    64
  4.    None of These
 Discuss Question
Answer: Option C. -> 64
Question 16. Determine Output:void main(){ char *p="hi friends", *p1; p1=p; while(*p!='\0') ++*p++; printf("%s", p1);}
  1.    ij!gsjfoet
  2.    hj grjeodt
  3.    None of These
  4.    hi friends
 Discuss Question
Answer: Option A. -> ij!gsjfoet
Question 17. Determine Output:void main(){ char far *farther, *farthest; printf("%d..%d", sizeof(farther), sizeof(farthest));}
  1.    2..4
  2.    2..2
  3.    4..2
  4.    4..4
 Discuss Question
Answer: Option C. -> 4..2
Question 18. Determine Output:void main(){ printf("%p", main);}
  1.    Some address will be printed
  2.    make an infinite loop
  3.    Error
  4.    None of These
 Discuss Question
Answer: Option A. -> Some address will be printed
Question 19. Determine Output:#include#define a 10void main(){ #define a 50 printf("%d", a);}
  1.    None of These
  2.    10
  3.    Compiler Error
  4.    50
 Discuss Question
Answer: Option D. -> 50
Question 20. Determine Output:#define clrscr() 100void main(){ clrscr(); printf("%d", clrscr());}
  1.    100
  2.    Error
  3.    1
 Discuss Question
Answer: Option A. -> 100

Latest Videos

Latest Test Papers