In a recursive function, if the base case is not properly defined, it can lead to a ________.
- Compilation Error
- Infinite Loop
- Memory Leak
- Stack Overflow
When the base case in a recursive function is not properly defined, it can lead to a stack overflow error. A stack overflow occurs when the function calls itself indefinitely, filling up the call stack. This results in a runtime error.
Loading...
Related Quiz
- Pointers can lead to ________ if not managed correctly in a C program.
- What is the lifetime of a static variable in a C program?
- When you increment a pointer in C, it advances the pointer by the size of the type to which it points, which is known as ________.
- What function is used to open a binary file for both reading and writing in C?
- The ________ loop guarantees at least one execution of the loop body, even if the condition is false from the start.