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?
- ANested functions are not allowed in standard C but are supported as extensions in
some compilers.
- BNested functions must be declared as inline.
- CNested functions must be defined before their enclosing function.
- 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.