Computer Science, asked by chamratchinechammu, 3 days ago

1 f) find the output for the following int a =5; y = a++ + ++a + a;​

Answers

Answered by geethapawaskar
0

Answer:

Depends on the programming language. In C and C++ (most likely candidates for this kind of misguided questions), the values of a and b, if any, are meaningless garbage because the expression “(++a) +(--a) +(a--) +(++a)” has no meaning in those languages. Formally, it is undefined due to sequence point violations.

Modern compilers will point this out:

Similar questions