Computer Science, asked by dolijaiswal25, 1 month ago

find the value of y if a=3 initially y=a++ + ++a + a;​

Answers

Answered by dastageerSayed
2

Answer:

11

Explanation:

the prefix (++a) increments the value before running the rest of the statement, while the postfix (a++) increments after running the rest of the statement.

Therefore:

if inital value of a = 3 then a ++ will give you 3 but ++a will be 5 hence

y = a++ + ++a + a will be 3+5+3 = 11

Similar questions