MCQs
Total Questions : 8
Answer: Option D. -> 5
In this program, we are finding the gcd of the number.
Output:
$ g++ ret5.cpp
$ a.out
5
Answer: Option A. -> same function name but different number of arguments
In function overloading, we can use any number of arguments but same function name.
Answer: Option B. -> 25
We are multiplying these values by adding every values.
Output:
$ g++ ret.cpp
$ a.out
25
Answer: Option A. -> 46.5
We are returning the value what we get as input.
Output:
$ g++ ret1.cpp
$ a.out
46.5
Answer: Option B. -> 7
In this program, we are returning the maximum value by using conditional operator.
Output:
$ g++ ret.cpp
$ a.out
7
Answer: Option B. -> caller function
None.
Answer: Option D. -> void
Void is used to not to return anything.
Answer: Option C. -> 3
The three types of returning values are return by value, return by reference and return by address.