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

What is the primary restriction on nested functions in C?

  1. ANested functions are not allowed in standard C but are supported as extensions in some compilers.
  2. BNested functions must be declared as inline.
  3. CNested functions must be defined before their enclosing function.
  4. DNested functions are fully supported in standard C.
Show answerHide answer

Correct answer: (A) Nested functions are not allowed in standard C but are supported as extensions in some compilers.

Explanation

Standard C does not allow a function to be defined inside another function. GCC supports nested functions only as a compiler extension.

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

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