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);
Show answerHide answer
Correct answer: (D) 10
Explanation
a[2] − a[0] = 15 − 5 = 10.
Correct answer: (D) 10
Explanation
a[2] − a[0] = 15 − 5 = 10.
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.