What is the output of the following code:

int p = 7, q = 4;
if (p > 10)
p = p + 3;
else
if (q > 6)
p = p – 2;
else
p = p + 1;
cout << p;

a) 8
b) 10
c) 5
d) 7


a) 8

Computer Science & Information Technology

You might also like to view...

Which of the following is not necessary to use the event delegation model?

a. An event listener must be registered. b. An event handler must be implemented. c. The appropriate interface must be implemented. d. The appropriate interface must be registered.

Computer Science & Information Technology

Text in columns, in the same placeholder, must be formatted the same

Indicate whether the statement is true or false

Computer Science & Information Technology

When you are creating linked text boxes, a pouring pitcher indicates that:

a. you can link the second text box to the first text box b. the text box is too small to add additional text c. multiple text boxes are linked

Computer Science & Information Technology

A shared network printer device is a(n) ____________________, like a folder, that is made available to network users for print services.

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

Computer Science & Information Technology