//f) The base case is not explicitly listed. If you choose this answer, // then you must explain what the base case is.
Here is recursive function. Identify the recursive case and the default case.
```
void recursive( int i ) //a)
{
if ( i < 8 ) //b)
{
i++; //c)
recursive(i); //d)
cout << i << " "; //e)
}
}
```
The recursive case is line d), where the call to recursive with a larger value of i . The other answer is f). The base case is not explicitly listed.
The base case is the “do nothing” alternative of the if statement, which is !(i == 8). This corresponds to i>=8. If you call the function with arg 9, the base case is 9.
You might also like to view...
The official standard for USB interfaces is called IEEE 1394.
Answer the following statement true (T) or false (F)
You can easily convert existing text to a table using the Convert Text to Table command on the Convert menu.
Answer the following statement true (T) or false (F)
(Polling) The Internet and the web are enabling more people to network, join a cause, voice opinions, and so on. The presidential candidates in 2008 used the Internet intensively to get out their messages and raise money for their campaigns. In this exercise, you’ll write a simple polling program that allows users to rate five social-consciousness issues from 1 (least important) to 10 (most
important). Pick five causes that are important to you (e.g., political issues, global environ- mental issues). Use a one-dimensional array topics (of type string) to store the five causes. To sum- marize the survey responses, use a 5-row, 10-column two-dimensional array responses (of type int), each row corresponding to an element in the topics array. When the program runs, it should ask the user to rate each issue. Have your friends and family respond to the survey. Then have the program display a summary of the results, including: a) A tabular report with the five topics down the left side and the 10 ratings across the top, listing in each column the number of ratings received for each topic. b) To the right of each row, show the average of the ratings for that issue. c) Which issue received the highest point total? Display both the issue and the point total. d) Which issue received the lowest point total? Display both the issue and the point total.
What will be the highest subscript value possible for an array with 15 elements?
A. 14 B. 15 C. 16 D. 17