Refer to function fox below when answering Question.

```
int fox
(int m, int n)
{
int ans;
if (m < 10)
if (n < 10)
ans = m + n;
else
ans = fox (m, n-2) + n;
else
ans = fox (m-1, n) + n;
return ans;
}
```
What is the value of fox (11, 11); ?
a. 18
b. 29
c. 39
d. 51
e. 0


d. 51

Computer Science & Information Technology

You might also like to view...

What is the output from each of the following loops?

a) while ( 0 ) cout << ‘X’; cout << endl; b) do cout << ‘X’; while ( y != y ); cout << endl; c) int i = 1; while (i < 9) cout i; i++; } cout << endl; d) char c = 'A'; do { cout << c << " "; c = c + 2; } while ( c <= 'M' ) cout << endl; e) int i = 0; while (i < 50) { if ( i < 20 && i != 15 ) cout << 'X'; i++; } cout << endl;

Computer Science & Information Technology

Suppose an array fruit is ["apple", "orange", "grape", "peach"]. fruit[0] is ___.

A. "apple" B. "orange" C. "grape" D. "peach" E. None of the above. There is no fruit[0]. You will get an "undefined" when you try to access fruit[0].

Computer Science & Information Technology

When you evaluate a camera's picture quality, the resolution is expressed in ________

A) gigapixels B) megapixels C) micropixels D) macropixels

Computer Science & Information Technology

Which of the following statements is false?

a. In a multithreaded application, threads can be distributed across multiple processors (if available) so that multiple tasks execute in parallel and the application can operate more efficiently. b. The JVM creates threads to run a program and for housekeeping tasks such as garbage collection. c. Multithreading can increase performance only on multi-core systems. d. The vast majority of programmers should use existing collection classes and interfaces from the concurrency APIs that manage synchronization for you.

Computer Science & Information Technology