# Answer to Question #23968 in C++ for Nourh

Question #23968

1. What does the following code output?

int c = 1;

c += 2 / 3 * c + 7*(c+1);

int c = 1;

c += 2 / 3 * c + 7*(c+1);

Expert's answer

int c = 1;

c += 2 / 3 * c + 7*(c+1);

the answer will be 15:

term 2/3*c = 2/3*1 = 2/3 (round down as integer) = 0

term 7*(c+1) = 7*(1+1) = 14

C += 0 + 14

ะก = 15

c += 2 / 3 * c + 7*(c+1);

the answer will be 15:

term 2/3*c = 2/3*1 = 2/3 (round down as integer) = 0

term 7*(c+1) = 7*(1+1) = 14

C += 0 + 14

ะก = 15

Need a fast expert's response?

Submit orderand get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

## Comments

## Leave a comment