Give the output of the recursive function below when called with an argument of 5. void recursive( int i )
{
Using namespace std;
If ( i < 8 )
{
I++;
Recursive(i) ;
Cout << i << " ";
}
}
A) 6 7 8
B) 5 6 7
C) 8 7 6
D) 7 6 5
E) None of the above.This is an infinite recursion if the function is called with argument 5.
Correct Answer:
Verified
Q9: It is proper for a recursion to
Q10: A recursive function must not return a
Q11: A binary search works with any array
Q12: Here is recursive function.Identify the recursive
Q13: A recursive function is a function whose
Q15: In recursion,it is unnecessary to decide whether
Q16: Each recursion causes a new activation frame
Q17: A recursive function can have only one
Q18: You are doing a binary search of
Q19: A proper recursive solution requires at least
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents