You are debugging a C program and notice that the program crashes after running for a few minutes. Upon investigation, you find that a recursive function is being called multiple times. What could be the most likely cause of the crash?
- Hardware Failure
- Infinite Loop
- Memory Leak
- Stack Overflow
The most likely cause of the crash in this scenario is a stack overflow. When a recursive function is called multiple times without a proper base case or termination condition, it can fill up the call stack, causing a stack overflow and program crash.
Loading...
Related Quiz
- Using the ________ function, the file pointer can be moved to the end of a file.
- The preprocessor directive ________ is used to include libraries in a C program.
- The function ________ is used to copy one string to another in C.
- What is the result of comparing two strings using the '==' operator in C?
- When declaring a variable in C, what does the 'static' keyword do to the variable's lifetime?