Question 66Asked in DSSSB TGT Computer Science (Technical), 13 Sep 2025, Shift 3 (5:00 PM)

What will be the output of the following C code? void main() {

What will be the output of the following C code? #include <stdio.h> void main() { printf("%d", printf("Tata Consultancy")); }
  1. ATata Consultancy
  2. BTata Consultancy15
  3. CTata Consultancy16
  4. D15Tata Consultancy
Show answerHide answer

Correct answer: (C) Tata Consultancy16

Explanation

The inner printf prints "Tata Consultancy" first and returns the number of characters printed, 16 (4 + space + 11). The outer printf then prints 16.

From DSSSB TGT Computer Science PYQ (Technical), 13 Sep 2025, Shift 3 (5:00 PM)

This is question 66 of DSSSB TGT Computer Science PYQ (Technical), 13 Sep 2025, Shift 3 (5:00 PM). 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.