Question 24Asked in DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 2 (1:00 PM)

What is the output of the following code? int main() {

What is the output of the following code? #include <stdio.h> int main() { printf("%d", printf("C Programming")); return 0; }
  1. A13
  2. BC Programming
  3. CC Programming12
  4. DC Programming13
Show answerHide answer

Correct answer: (D) C Programming13

Explanation

The inner printf runs first, prints "C Programming" and returns the number of characters printed, 13. The outer printf then prints 13, giving "C Programming13".

From DSSSB TGT Computer Science PYQ (Technical), 12 Sep 2025, Shift 2 (1:00 PM)

This is question 24 of DSSSB TGT Computer Science PYQ (Technical), 12 Sep 2025, Shift 2 (1: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.