Question 133

What is the output? int a = 1;

What is the output? int a = 1; a = a << 2; printf("%d", a);
  1. A8
  2. B1
  3. C4
  4. D2
Show answerHide answer

Correct answer: (C) 4

Explanation

Left shift by 2 multiplies by 4.

From DSSSB TGT Computer Science Full Mock Test 4

This is question 133 of DSSSB TGT Computer Science Full Mock Test 4. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.