What is the output of the following code fragment?
int f1(int base, int limit)
{
if(base > limit)
return -1;
else
if(base == limit)
return 1;
else
return base * f1(base+1, limit);
}
int main()
{
cout << f1(2,4)<
}
a. 2
b. 3
c. -1
d. 6
d. 6
Computer Science & Information Technology
You might also like to view...
MC Independent configuration of a subcomponent allows:
a) the appearance of that subcomponent to be modified. b) the functionality of that subcomponent to be modified. c) Both a and b. d) None of the above
Computer Science & Information Technology
One ____________ of memory is large enough to store only a letter of the alphabet or a small number.
a. bit b. byte c. sector d. word ?
Computer Science & Information Technology