Question 130

What is the output? int x = 5;

What is the output? int x = 5; int *p = &x; *p = *p + 5; printf("%d", x);
  1. AAddress of x
  2. B15
  3. C5
  4. D10
Show answerHide answer

Correct answer: (D) 10

Explanation

Changing *p changes x.

From DSSSB TGT Computer Science Full Mock Test 2

This is question 130 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.