Question
a.
very expensive in terms of memory.
b.
low performance.
c.
every recursive program can be written with iteration too.
d.
all of the above are true.
Posted under Data Structures and Algorithms
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. What about recursion is true in comparison with iteration?
Similar Questions
Discover Related MCQs
Q. The following formula will produce
Fn = Fn-1 + Fn-2
View solution
Q. Tower of hanoi is a classic example of
View solution
Q. Recursion uses more memory space than iteration because
View solution
Q. A procedure that calls itself is called
View solution
Q. If there's no base criteria in a recursive program, the program will
View solution
Q. An algorithm that calls itself directly or indirectly is known as
View solution
Q. Which Data Structure is used to perform Recursion?
View solution
Q. What’s happen if base condition is not defined in recursion ?
View solution
Q. It is necessary to declare the type of a function in the calling program if the function
View solution
Q. Running out of memory may occur due to
View solution
Q. When a function is recursively called, all automatic variables
View solution
Q. Predict output of following program
Consider the following recursive function fun(x, y). What is the value of fun(4, 3)
int fun(int x, int y)
{
if (x == 0)
return y;
return fun(x - 1, x + y);
}
View solution
Q. What does the following function print for n = 25?
void fun(int n)
{
if (n == 0)
return;
printf("%d", n%2);
fun(n/2);
}
View solution
Q. ________________ is a powerful technique which is used to invoke a function.
View solution
Q. A function, which invokes itself repeatedly until some condition is satisfied, is called a_________.
View solution
Q. The number of recursive calls is limited to the _____ of the stack.
View solution
Q. Two or more functions, which invoke (call) each other, are called_________________.
View solution
Q. For certain problems, a recursive solution is ____________as in the case of factorial of a number.
View solution
Q. A recursive function is often less efficient compared to an iterative function. But it is more________.
View solution
Q. An iterative function is preferred when its recursive equivalent is__________.
View solution
Suggested Topics
Are you eager to expand your knowledge beyond Data Structures and Algorithms? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!