C C — Learn

C programming language MCQ Questions Set 5

Review each question and reveal answers to strengthen your understanding

1 How many minimum number of functions should be present in a C++ program for its execution?
✅ Correct Answer: 2
2 Which of the following is the default return value of functions in C++?
✅ Correct Answer: 1
3  What happens to a function defined inside a class without any complex operations (like looping, a large number of lines, etc)?
✅ Correct Answer: 3
4  What is an inline function?
✅ Correct Answer: 1
5 When we define the default values for a function?
✅ Correct Answer: 2
6 Where should default parameters appear in a function prototype?
✅ Correct Answer: 1
7 If an argument from the parameter list of a function is defined constant then ______
✅ Correct Answer: 2
8 Which of the following feature is used in function overloading and function with default argument?
✅ Correct Answer: 2
9 From which function the execution of a C++ program starts?
✅ Correct Answer: 2
10 Which of the following is important in a function?
✅ Correct Answer: 3
11 Which is used to keep the call by reference value as intact?
✅ Correct Answer: 2
12 By default how the value are passed in c++?
✅ Correct Answer: 1
13 What will happen when we use void in argument passing?
✅ Correct Answer: 1
14 Where does the return statement returns the execution of the program?
✅ Correct Answer: 2
15 When will we use the function overloading?
✅ Correct Answer: 1
16  If the user did not supply the value, what value will it take?
✅ Correct Answer: 1
17 Where can the default parameter be placed by the user?
✅ Correct Answer: 2
18 Which value will it take when both user and default values are given?
✅ Correct Answer: 1
19 What we can’t place followed by the non-default arguments?
✅ Correct Answer: 2
20 If we start our function call with default arguments means, what will be proceeding arguments?
✅ Correct Answer: 3
21 What is the default return type of a function?
✅ Correct Answer: 2
Back to All Quizzes