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...

A definition in which something is defined in terms of a smaller version of itself is called a(n) ____ definition.

A. step-wise B. recursive C. member-wise D. iterative

Computer Science & Information Technology

Machines called _______ enable self-service transactions in busy locations, such as hotels and airports.

A. kiosks B. drones C. robots D. pop-ups

Computer Science & Information Technology

Every Ethernet switch uses the IEEE ____________________ trunk standard that enables you to connect switches from different manufacturers.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

A ____ is a digital image of your screen.

A. file B. mirror C. screen capture D. window

Computer Science & Information Technology