1.

In the absence of a exit condition in a recursive function, the following error is given __________(a) Compile time error(b) Run time error(c) Logical error(d) No errorI had been asked this question by my college director while I was bunking the class.My enquiry is from Recursion in division Miscellaneous Topics in C of C

Answer»

Right option is (B) Run time error

Easiest explanation - When a recursive function is called in the absence of an EXIT condition, it results in an INFINITE loop DUE to which the stack keeps getting filled(stack OVERFLOW). This results in a run time error.



Discussion

No Comment Found

Related InterviewSolutions