Question: 1 -
Which of the following statement will be correct if the function has three arguments passed to it?
-
The trailing argument will be the default argument.
-
The first argument will be the default argument.
-
All the argument will be the default argument.
-
The middle argument will be the default argument.
Answer:
The trailing argument will be the default argument.
Solution not available.
Question: 2 -
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.
-
A
-
B
-
D
-
C
Answer:
C
Solution not available.
Question: 3 -
Which of the following function prototype is perfectly acceptable?
-
int Function(int Tmp = Show());
-
float Function(int Tmp = Show(int, float));
-
float = Show(int, float) Function(Tmp);
-
Both A and B.
Answer:
int Function(int Tmp = Show());
Solution not available.
Question: 4 -
Where does the execution of the program starts?
-
else function
-
user-defined function
-
main function
-
void function
Answer:
main function
Solution:
Normally the execution of the program in c++ starts from main only.
Normally the execution of the program in c++ starts from main only.
Question: 5 -
Which of the following statement is correct?
-
We cannot use the constant while defining the function.
-
C++ enables to define functions that take constants as an argument.
-
Both A and B.
-
We cannot change the argument of the function that that are declared as constant.
Answer:
Both A and B.