What is the output of the function call strange (6) given the following definition?

void strange (int n)
{
if (n > 1)
{
cout << n + 1 << “ “ << endl;
strange (n-2);
cout << n-1 << “ “ << endl;
}
}

7 5 3 1 3 5

Computer Science & Information Technology

You might also like to view...

Which of the following is not true when delivering a presentation?

A) When practicing without an audience, it is not necessary to practice talking out loud to an empty room. B) It is a good idea to enlist a few people to watch a practice session and ask for their honest feedback. C) Once you have completed the slides for the presentation, you should practice using them. D) Practice by projecting the presentation with the actual equipment you will use, if possible, and practice using the speaker notes, advancing the slides, and looking out into the imaginary audience.

Computer Science & Information Technology

Answer the following questions true (T) or false (F)

1. A package cannot contain other packages. 2. Clients of a class can directly access the protected members of that class. 3. An instance of a superclass can be used anywhere an instance of its subclass is expected.

Computer Science & Information Technology