Constants and Variables - DragonWins



Unless specified otherwise, assume that:

• The variables i, j, k, l, m, and n are declared as int

• The variables u, v, w, x, y, and z are declared as doubles.

• Any reference to a “floating point” value is to be taken as a type double.

• Any reference to an “integer” value is to be taken as a type int.

MULTIPLE CHOICE – TWO POINTS EACH

Of the choices available, select the one that is the best response and circle the appropriate letter.

1) What are the values of the variables after the following statements are executed?

j = 1;

k = j++;

m = (++k = = j++);

a) j = 2 k = 2 m = 0

b) j = 3 k = 3 m = 1

c) j = 3 k = 2 m = 1

d) j = 3 k = 2 m = 0

2) Which of the following are complementary pairs of operators?

a) (= = , !=), (>,=, =,, ,>=), ( ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download

To fulfill the demand for quickly locating and searching documents.

It is intelligent file search solution for home and business.

Literature Lottery

Related searches