Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. Where does the execution of the program starts? a) user-defined function b) m

ID: 3600815 • Letter: 1

Question

1. Where does the execution of the program starts? a) user-defined function b) main function c) void function d) none of the mentioned 2. What are mandatory parts in function declaration? a) return type, function name b) return type, function name, parameters c) both a and b d) none of the mentioned 3. which of the following is optional when declaring a function? a) function name b) function parameters c) function return type d) All of the mentioned 4. What is the scope of the variable declared in the user defined function? a) whole program b) only inside the 0block of the function c) both a and b d) none of the mentioned 5. How many minimum number of functions are required to be presented in c++? a) 0 b) 1 c) 2 d) 3

Explanation / Answer

1. where does the execution of the program starts?

ANSWER IS : b) main function

Explanation: usually, in c++ program, execution begin from the main function


2)what are mandatory parts in function declaration?

ANSWER IS: a) return type, function name

EXPLANATION: For function declaration, return type, function name is mandatory,
providing parameters is an optional one.

3)which of the following is option when declaring a function?

ANSWER IS: b) function parameters

EXPLANATION: For function declaration, return type, function name is mandatory,
providing parameters is an optional one.


4. what is the scope of the variable declared in the user defined function?

ANSWER IS: b) only inside the {} block of the function

EXPLANATION: life or scope of the variable declared within the user
defined function is, till the function is executed.once the control exit from
the function, the variable dies. so we cannot access the variable, outside
the function.

5. How many minimum number of functions are required to be presented in c++?

ANSWER IS : b) 1

EXPLANATION: main function is mandatory for starting the execution of the program.