Question 129

What is the output? int a[] = {5, 10, 15};

What is the output? int a[] = {5, 10, 15}; int *p = a; printf("%d", *(p + 2) - *p);
  1. A5
  2. B2
  3. C15
  4. D10
Show answerHide answer

Correct answer: (D) 10

Explanation

a[2] − a[0] = 15 − 5 = 10.

From DSSSB TGT Computer Science Full Mock Test 4

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