18. What is the output of the following code fragment?
int f1(int n, int m)
{
if(n < m)
return 0;
else if(n==m)
return m+ f1(n-1,m);
else
return n+ f1(n-2,m-1);
}
int main()
{
cout << f1(1,4);
return 0;
}
a. 0
b. 2
c. 4
d. 8
e. infinite recursion
a. 0
You might also like to view...
When creating a query, placing two criteria in different rows indicates that the ________ logical operator applies
Fill in the blank(s) with correct word
What is the Windows Vista tool for managing users and groups?
A. Users and Passwords applet B. User accounts and Groups applet C. Users and Groups applet D. User Accounts applet
All of the following are rules of thumb for selecting a risk treatment strategy EXCEPT:
A. When a vulnerability exists in an important asset, implement security controls to reduce the likelihood of a vulnerability being exploited. B. When the likelihood of an attack is high and the impact is great, outsource security efforts so that any resulting loss is fiscally someone else's responsibility. C. When a vulnerability can be exploited, apply layered protections, architectural designs, and administrative controls to minimize the risk or prevent the occurrence of an attack. D. When the potential loss is substantial, apply design principles, architectural designs, and technical and nontechnical protections to limit the extent of the attack, thereby reducing the potential for loss.
One trend involving servers is ____________________, which means creating virtual (rather than actual) versions of a computing resource.
Fill in the blank(s) with the appropriate word(s).