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...

Details that describe an Excel file, such as the author or title, are called the document ________

A) references B) labels C) values D) properties

Computer Science & Information Technology

An active cell is outlined with a thick, blue border

Indicate whether the statement is true or false.

Computer Science & Information Technology