public static int func2(int m, int n){    if (n == 0)        return 0;    else        return m + func2(m, n - 1);}What is the output of func2(2, 3)?

A. 2
B. 3
C. 5
D. 6


Answer: D

Computer Science & Information Technology

You might also like to view...

In a value-returning method, the type of data the method returns is commonly called the method's ____________.

a. method value b. named type c. assigned value d. return type

Computer Science & Information Technology

What is the role of enterprise continuity?

What will be an ideal response?

Computer Science & Information Technology

Which of the following statements is false?

a. Each identifier has a scope that determines where you can use it in your pro-gram. For that portion of the program, the identifier is said to be “in scope.” b. A local variable’s identifier has local scope. It’s “in scope” only from its defini-tion to the end of the program. It “goes out of scope” when the function returns to its caller. c. A local variable can be used only inside the function that defines it. d. All of the above statements are correct.

Computer Science & Information Technology

An example of a(n) ____________________ entity is the copyright symbol or a fraction such as ½.

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

Computer Science & Information Technology