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
You might also like to view...
Closing tags are identified by the ____ that precedes the tag name.
A. question mark B. exclamation point C. slash D. ampersand
When changing fonts using the Mini toolbar, ________ is not available
Fill in the blank(s) with correct word
In two short decades, the number of Web pages increased from 30 to more than 1 trillion
Indicate whether the statement is true or false
The formula for Gross Profit is Net Sales - Cost of Goods Sold. You want to find the gross profit next year given a 2% gross profit growth rate. You enter the following formula into a query, but your numbers do not seem to be right. Why?
[Sales Data]![Net Sales] - [Sales Data]![Cost of Goods Sold]*1.02 A) The formula should be multiplied by 102%. B) A formula cannot contain a field reference and a constant. C) Access does not recognize decimals. D) The formula does not specify the right order of operations.