Functions Questions And Answers.


1.Which of the following function prototype is perfectly acceptable?
A. int Function(int Tmp = Show());
B. float Function(int Tmp = Show(int, float));
C. Both A and B.
D. float = Show(int, float) Function(Tmp);

2.Which of the following statement is correct?
A. C++ enables to define functions that take constants as an argument.
B. We cannot change the argument of the function that that are declared as constant.
C. Both A and B.
D. We cannot use the constant while defining the function.

3.Which of the following statement is correct?
A. Overloaded functions can have at most one default argument.
B. An overloaded function cannot have default argument.
C. All arguments of an overloaded function can be default.
D. A function if overloaded more than once cannot have default argument.

4.Which of the following statement will be correct if the function has three arguments passed to it?
A. The trailing argument will be the default argument.
B. The first argument will be the default argument.
C. The middle argument will be the default argument.
D. All the argument will be the default argument.

5.What will be the output of the program?
A. 237
B. 242
C. 240
D. 35