Question: Consider the following code snippet: void my_recursive_function() { my_recursive_function(); } int main() { my_recursive_function(); return 0; } What will happen when the above snippet is
Consider the following code snippet:
void my_recursive_function() { my_recursive_function(); } int main() { my_recursive_function(); return 0; } What will happen when the above snippet is executed?
a) The code will be executed successfully and no output will be generated
b) The code will be executed successfully and random output will be generated
c) The code will show a compile time error
d) The code will run for some time and stop when the stack overflows
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
