Sail E0 Webinar

MCQs

Total Questions : 24 | Page 3 of 3 pages
Question 21. Which operator from the following has the lowest priority?
  1.    Assignment operator
  2.    Division operator
  3.    Comma operator
  4.    Conditional operator
  5.    Unary-operator
 Discuss Question
Answer: Option C. -> Comma operator
Question 22. Identify the correct output of the following code:
void main()
{
int w=10, x=5, y=3, z=3;
if( (w < x ) && (y=z++) )
printf("%d %d %d %d", w, x, y, z);
else
printf("%d %d %d %d", w, x, y, z);
}
  1.    10 5 4 4
  2.    10 5 3 3
  3.    10 5 4 3
  4.    10 5 3 4
  5.    10 5 5 5
 Discuss Question
Answer: Option B. -> 10 5 3 3
Question 23. Void main()
{
int a=10, b;
b = a++ + ++a;
printf("%d %d %d %d", b, a++, a, ++a);
}
what will be the output when following code is executed?
  1.    12 10 11 13
  2.    22 12 12 13
  3.    22 11 11 11
  4.    22 14 12 13
  5.    22 13 14 14
 Discuss Question
Answer: Option E. -> 22 13 14 14
Question 24. Given b=110 and c=20, what is the value of 'a' after execution of the expression a=b-=c*=5?
  1.    450
  2.    10
  3.    110
  4.    -10
  5.    -110
 Discuss Question
Answer: Option B. -> 10

Latest Videos

Latest Test Papers