Question 129

What is the output? char *s = "HELLO";

What is the output? char *s = "HELLO"; printf("%c", *(s + 1));
  1. AL
  2. BE
  3. CH
  4. DGarbage
Show answerHide answer

Correct answer: (B) E

Explanation

*(s + 1) is s[1] = 'E'.

From DSSSB TGT Computer Science Full Mock Test 2

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