How many times is the following code invoked by the call recursive(4)?
```
void recursive( int i )
{
using namespace std;
if (i < 8)
{
cout << i << " ";
recursive(i);
}
}
```
a) 2
b) 4
c) 8
d) 32
e) This is an infinite recursion.
e) This is an infinite recursion.
This is an infinite recursion (or no recursion at all if i starts out greater than 8). There is no change in i to move closer to the non-recursive case of i >= 8.
Computer Science & Information Technology
You might also like to view...
Macros are stored in ________
Fill in the blank(s) with correct word
Computer Science & Information Technology
Pressing [tab] after typing text in a cell accepts your entry and activates the next cell in the column.
Answer the following statement true (T) or false (F)
Computer Science & Information Technology