Computer Science, asked by mahuyadasbera, 2 months ago

8. State the value a, b and c after the execution of each of the following statements where a=12, =13
and C=11:
i. a=a++ +--b + C++;
ii. b=b++ + ++ a *2;​

Answers

Answered by jharajesh3842
0

Answer:

Depends on the programming language: the question is not specifying one. Different languages - different rules.

In languages where “+++” is not an operator and both “++” and “+” are, three plusses in a row typically parse as “++ +”, giving “++c++ + c”. In C and C++ and Java, that is ill-formed (cannot be compiled)

If you were to add a space to make that into “++c + ++c”, the resulting expression is undefined in C and C++: the program that attempts to evaluate this is meaningless and any value you may see in a given test (I notice some other answers bring up 24 and 23) is also just noise from a broken program.

Answered by gunaseelank280148
1

Answer:

(i)a=36

(ii)b=56

Explanation:

(i)a=12+13+11

a=25+11

a=36

(ii)b=13+13*2

b=26*2

b=52

Similar questions