What is wrong with the following recursive function? It should print out the array backwards.
void print(int array[], int start, int size)
{
if(start == size)
return;
else
{
print(array, start-1,size);
cout << array[start] << endl;
}
}
a. infinite recursion
b. the stopping condition is wrong
c. the recursive call is wrong
d. nothing
c. the recursive call is wrong
Computer Science & Information Technology
You might also like to view...
Reviewers comments are uniquely identified by ________
A) distinct color B) unique font C) unique color underline D) unique color balloon
Computer Science & Information Technology
A gray box displays around fieldset elements
Indicate whether the statement is true or false
Computer Science & Information Technology