Question 130

What is the output? char s[] = "DSSSB";

What is the output? char s[] = "DSSSB"; printf("%d", (int)sizeof(s));
  1. A6
  2. B5
  3. C7
  4. D4
Show answerHide answer

Correct answer: (A) 6

Explanation

5 characters + 1 null terminator = 6 bytes.

From DSSSB TGT Computer Science Full Mock Test 1

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