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
b. the stopping condition is wrong
Computer Science & Information Technology
You might also like to view...
The width of a table column can be changed manually or by using the ________ command
A) AutoFit Contents B) AutoCorrect C) Cell Margins D) AutoFormat
Computer Science & Information Technology
In a(n) ____________________ data type, each data item is a collection of other data items.
Fill in the blank(s) with the appropriate word(s).
Computer Science & Information Technology