468 views

4 Answers

Best answer
2 votes
2 votes
True.

A recursion program is a function that calls itself. Without a terminating condition, the function will keep calling itself indefinitely, resulting in an infinite loop. This will cause the program to continue running indefinitely, providing an infinite output.It will cause RUNTIME  ERROR
selected by
2 votes
2 votes

True.

Every Recursive program needs a termination condition. Basically, it didn’t go to infinite because Stack size is limited. That’s why it gives RUNTIME ERROR: StackOverflow.

1 votes
1 votes
True.

A recursion program without a terminating condition, also known as an infinite recursion, will continue to call itself indefinitely, eventually causing a stack overflow error or running out of memory. This will result in an infinite output or an infinite loop, and the program will not terminate until the system crashes. Therefore, it is important to have a terminating condition in recursion to prevent such errors and ensure that the program executes correctly.
0 votes
0 votes

True, if there is no terminating condition for the recursive algorithm, the algorithm runs the stack overflow exception. 

Related questions

1 votes
1 votes
3 answers
1
jverma asked May 23, 2022
1,062 views
#include <stdio.h>int f(int n){ static int r = 0; if (n <= 0) return 1; r=n; return f(n-1) + r;}int main() { printf("output is %d", f(5)); return 0;}Ou...
0 votes
0 votes
0 answers
2
gateexplore asked Oct 25, 2023
129 views
It is always true that Recursive code is easier to debug?? If yes then why?? please give full explanation.
0 votes
0 votes
3 answers
4
Nisha Bharti asked Sep 26, 2022
730 views
What is the time & space complexity of this algorithm?Main(){ for(i=n; i>10; i=i^1/4) { for(j=201; j<n^3; j=j+400) ...