int recFunc(int num){  if (num >= 10)     return 10;  else     return num * recFunc(num + 1);}
Consider the accompanying definition of a recursive function. What is the output of the following statement?cout << recFunc(8) << endl;

A. 4
B. 8
C. 72
D. 720


Answer: D

Computer Science & Information Technology

You might also like to view...

Consider the class

``` class Value { private T v; public Value(T v1) { v = v1; } public void output() { System.out.println(v); } } ``` The code Value nV1 = new Value(34.5); A) will cause a compiler error B) will compile correctly, but cause an exception at run time C) will compile and run correctly D) None of the above

Computer Science & Information Technology

Which command below runs TestProgram, and passes in the values files.txt and 3?

a. java TestProgram files.txt 3. b. java TestProgram files.txt, 3. c. java TestProgram "files.txt", "3". d. None of the above.

Computer Science & Information Technology

You can drag a(n) ____________________, which is the border to the right of a column, until the column is the desired width.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

Objectification means:

A. Ranking people according to objective social categories B. Treating people as if they were objects C. Objecting to people wo are the “other” D. Evaluating people’s abilities objectively

Computer Science & Information Technology