What is the output of the following code?

int x = 10, y = 4;
do
{
x = x – 2;
y = y + 4;
cout << x << “ “;
} while (y <= 16);
x = x + 1;
cout << x << “ “ << y;

a) 8 6 4 2 3 20
b) 8 6 4 5 16
c) 10 8 6 4 5 20
d) none of the above


a) 8 6 4 2 3 20

Computer Science & Information Technology

You might also like to view...

____________ is a process that runs automatically in the background from time to time, removing all referenced objects from memory.

a. System cleanup b. Garbage collection c. Nullification d. Non-mask able Interrupt

Computer Science & Information Technology

Information about a program is stored on your hard disk in a special file called the Windows ____________________that keeps track of all the hardware and software installed on your computer.

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

Computer Science & Information Technology

What is displayed on the console when running the following program?

``` public class Test { public static void main (String[] args) { try { System.out.println("Welcome to Java"); } finally { System.out.println("The finally clause is executed"); } } }``` a. Welcome to Java b. Welcome to Java followed by The finally clause is executed in the next line c. The finally clause is executed d. None of the above

Computer Science & Information Technology

Software that enables a new piece of hardware to work on your computer is a(n) ________

Fill in the blank(s) with correct word

Computer Science & Information Technology