The return statement can be omitted in a function with a return type other than void if _______.
- it's a template function
- it throws an exception
- it's a friend function
- it's an inline function
In C++, if a function with a return type other than void does not have a return statement, but throws an exception that exits the function, it's acceptable and will not result in a compilation error.
Loading...
Related Quiz
- In tail recursion, the recursive call is the _______ action to be performed in the function.
- Consider a large-scale software project that heavily utilizes templates and generic programming. With an impending deadline, the compilation time is becoming a significant bottleneck. Which C++ feature/technique might be best suited to reduce compilation times without altering runtime performance?
- What is a destructor used for in C++?
- In a graphics rendering engine, you need to store RGB color values. Which data type would be most appropriate for each color channel to balance memory usage and color depth?
- The function _______ is used to close a file.