Question: What is wrong with the following recursive function? int recursiveAlgorithm (int n) { if (n = 0) return 0; } printf(d,n): return n + recursiveAlgorithm

 What is wrong with the following recursive function? int recursiveAlgorithm (int

What is wrong with the following recursive function? int recursiveAlgorithm (int n) { if (n = 0) return 0; } printf("d",n): return n + recursiveAlgorithm (n) ; } int main() { int i = recursiveAlgorithm (5); printf("d", i); return 0; 1 A. It does not have a base case B. The general case does not reduce the size of the problem OC. The base case should be 1 OD. It should not have a base case E. it should be pass-by-reference and NOT pass-by-value

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!