Sail E0 Webinar

MCQs

Total Questions : 209 | Page 1 of 21 pages
Question 1. Which of the following statements should be used to obtain a remainder after dividing 3.14 by 2.1 ?
  1.    rem = fmod(3.14, 2.1);
  2.    Remainder cannot be obtain in floating point division.
  3.    rem = 3.14 % 2.1;
  4.    rem = modf(3.14, 2.1);
 Discuss Question
Answer: Option A. -> rem = fmod(3.14, 2.1);
Question 2. Determine Output:void main(){ float me = 1.1; double you = 1.1; if(me==you) printf("I hate Examveda"); else printf("I love Examveda");}
  1.    Error
  2.    I love Examians
  3.    I hate Examians
  4.    None of These
 Discuss Question
Answer: Option B. -> I love Examians
Question 3. Determine Output:void main(){ char s[]="man"; int i; for(i=0; s[i]; i++) printf("%c%c%c%c ", s[i], *(s+i), *(i+s), i[s]);}
  1.    Compiler Error
  2.    mmm nnn aaa
  3.    mmmm nnnn aaaa
  4.    None of These
 Discuss Question
Answer: Option D. -> None of These
Question 4. What will be the output of the following program?
#include\
int main(){ 
extern int i; 
i = 20; 
printf("%ld ", sizeof(i)); 
return 0;
}
  1.    Depends on the Compiler
  2.    2
  3.    4
  4.    Linker Error : Undefined symbol 'i'
 Discuss Question
Answer: Option D. -> Linker Error : Undefined symbol 'i'
Question 5. Determine output:void main(){ int const *p=5; printf("%d", ++(*p));}
  1.    Compiler Error
  2.    5
  3.    Garbage Value
  4.    6
 Discuss Question
Answer: Option A. -> Compiler Error
Question 6. Determine Output:void main(){ static int var = 5; printf("%d ", var--); if(var) main();}
  1.    None of These
  2.    Infinite Loop
  3.    5 4 3 2 1
  4.    5 5 5 5 5
 Discuss Question
Answer: Option C. -> 5 4 3 2 1
Question 7. Determine Output:void main(){ int c = - -2; printf("c=%d", c);}
  1.    1
  2.    2
  3.    -2
  4.    Error
 Discuss Question
Answer: Option B. -> 2
Question 8. Determine Output:void main(){ char *p; printf("%d %d", sizeof(*p), sizeof(p));}
  1.    2 2
  2.    1 1
  3.    2 1
  4.    1 2
 Discuss Question
Answer: Option D. -> 1 2
Question 9. Determine the Final Output:void main(){ printf("\nab"); printf("\bsi"); printf("\rha");}
  1.    haasi
  2.    asiha
  3.    absiha
  4.    hai
 Discuss Question
Answer: Option D. -> hai
Question 10. Determine Output:void main(){ int i=10; i=!i>14; printf("i=%d", i);}
  1.    10
  2.    1
  3.    0
  4.    14
 Discuss Question
Answer: Option C. -> 0

Latest Videos

Latest Test Papers