Computer Science, asked by bloomingalchemy, 9 months ago

evaluate the following if a=2 b=3 and c=6 Find c+=a++ + ++a * b​

Answers

Answered by Anonymous
2

Answer:

but now i have to also resolve the problems on paper.

i thought i undersand how to handle the operators ++ -- as sufix and prefix yet i don't know how to use it here.

1

2

3

int a=15, b=3;

a= a*6/a++;

b= --b*a++/b;

in exercise a should i add 1 to (a=15) before dividing or after or what should i do ?

i tried

a= 15*6/15+1

a= 90/15+1

a= 6+1

a= 7

but when i run the program the answer is 8 so i know i'm doing it wrong.

in the other problem

b= --b*a++/b;

i thought

b= (3-1)*15+1/3

Answered by Oreki
0

Output:

20

Explanation:

> c += a++ + ++a * b

> c += 2 + 4 * 3

> c += 2 + 12

> c = c + 14

> c = 6 + 14

> c = 20

Similar questions