Question 13Asked in DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 3

Which statements is correct regarding main() function in C++?

Which statements is correct regarding main() function in C++? I. It is a user defined function. II. It is a pre-defined function.
  1. AOnly I
  2. BOnly II
  3. CBoth I and II
  4. DNeither I nor II
Show answerHide answer

Correct answer: (A) Only I

Explanation

main() is called by the system, but its body is written by the programmer, so it is treated as a user-defined function, not a library (pre-defined) function.

From DSSSB TGT Computer Science PYQ (Technical), 1 Aug 2021, Shift 3

This is question 13 of DSSSB TGT Computer Science PYQ (Technical), 1 Aug 2021, Shift 3. 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.