What is the output of the statement

cout << something(3)
given the following definition?
int something (int n)
{
if (n == 1)
return 3;
else
return 2 * something (n – 1);
}


12

Computer Science & Information Technology

You might also like to view...

Which of the following is the state bit that is set when an attempted operation fails?

a. ios::failbit b. ios::badbit c. ios::hardfail d. ios::goodbit e. None of these

Computer Science & Information Technology

The entire set of actions an organization must take to switch over to using a new program or set of programs is called ____.

A. turnover B. renovation C. translation D. conversion

Computer Science & Information Technology

If a gallery on the Ribbon has more options than can be displayed on the Ribbon, you click its ____ button to open the full gallery.

A. More B. Plus C. Expand D. Open

Computer Science & Information Technology

All layout classes are direct subclass of

1. android.widget.AbsoluteLayout 2. java.lang.Object 3. android.view.ViewGroup 4. android.view.View

Computer Science & Information Technology