Can recursive functions be declared as inline?
- It depends
- No
- Not always
- Yes
Recursive functions can be declared as inline, but it's important to understand the implications. While technically possible, inlining recursive functions can lead to code bloat and stack overflow errors, as each inlined call consumes stack space. The decision to inline recursive functions should be made judiciously based on the specific use case.
Loading...
Related Quiz
- The _______ keyword is used to specify a class should not be instantiated directly, but only used as a base class.
- In a switch statement, each case ends with the ______ keyword to prevent fall-through.
- When passing parameters by reference, which symbol is used to denote reference in C++?
- In C++, an abstract class can have a mix of abstract as well as _______ methods.
- The conditions in a switch-case statement must be of _______ data type.