Question 133

What is the output? int x = 7;

What is the output? int x = 7; printf("%d", x >> 1);
  1. A14
  2. B1
  3. C3
  4. D6
Show answerHide answer

Correct answer: (C) 3

Explanation

Right shift by 1 divides by 2 (integer): 3.

From DSSSB TGT Computer Science Full Mock Test 2

This is question 133 of DSSSB TGT Computer Science Full Mock Test 2. 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.