CUET PG 2021 Computer PYQ — The minimum number of functions should be present in a C++ progra… | Mathem Solvex | Mathem Solvex
Tip:A–D to answerE for explanationV for videoS to reveal answer
CUET PG 2021 — Computer PYQ
CUET PG | Computer | 2021
The minimum number of functions should be present in a C++ program for its execution is
Choose the correct answer:
A.
0
B.
1
(Correct Answer)
C.
2
D.
3
Correct Answer:
1
Explanation
The Main Requirement:
Every standalone C++ program must have exactly one function named main(). Without it, the linker will throw an error because it cannot find the entry point.
Entry Point=f(main)
User-defined Functions:
While you can have n additional functions, they are optional for the program to run.
Total Functions=1+n(where n≥0)
Minimum (n=0)=1
Explanation
The Main Requirement:
Every standalone C++ program must have exactly one function named main(). Without it, the linker will throw an error because it cannot find the entry point.
Entry Point=f(main)
User-defined Functions:
While you can have n additional functions, they are optional for the program to run.