C++ Programming Online Test – Multiple Choice Questions and Answers 1. Which of the following statement is correct? The default value for an argument cannot be function call C++ does not allow the redefinition of a default parameter C++ allows the redefinition of a default parameter Both B and C 2. Which of the following statement is incorrect? It is necessary that a constructor in a class should always be public Constructor is a member function of the class The compiler always provides a zero argument constructor Both B and C 3. Which of the following statement is correct? Two functions having same number of argument, order and type of argument can be overloaded if both functions do not have any default argument Overloaded function must have default arguments starting from the left of argument list Overloaded function must have default arguments A function can be overloaded more than once 4. For automatic objects, constructors and destructors are called each time the objects are constructed enter and leave scope inherit parent class are destroyed 5. Which of the following statement is incorrect? The default arguments are given in the function prototype Compiler uses the prototype information to build a call, not the function definition The default arguments are given in the function prototype and should be repeated in the function definition The default value for an argument can be a global constant 6. When are the Global objects destroyed? When the program terminates When the control comes out of the function in which they are being used When the control comes out of the block in which they are being used As soon as local objects die 7. Which constructor function is designed to copy objects of the same class type? Object constructor Create constructor Dynamic constructor Copy constructor 8. Which of the following function / type of function cannot be overloaded? Both B and C Static function Virtual function Member function 9. Which of the following statement is correct? A function if overloaded more than once cannot have default argument An overloaded function cannot have default argument Overloaded functions can have at most one default argument All arguments of an overloaded function can be default 10. Which of the following statement is incorrect? Default argument cannot be provided for pointers to functions A function can have all its arguments as default A default argument cannot be redefined in later declaration Default arguments can be provided for pointers to functions Loading … Question 1 of 10