In C++, the return statement cannot be used inside a _______.
- constructor
- destructor
- class
- loop
In C++, constructors are used for initializing objects. They don't return values, not even void. Therefore, the return statement is not allowed inside a constructor.
Loading...
Related Quiz
- A function that calls itself directly or indirectly is known as a _______ function.
- What does the new operator do in C++?
- The problem in which a derived class may inherit the same member more than once from a base class hierarchy is known as the _______ problem.
- When an array is passed to a function, it is always passed by _______.
- A function without any parameters is declared with the keyword _______ in the parentheses.