+ 1
Please tell me the values of "a" and "b" during the operation in the program.
int a=10, b= 5; (a++) +a+= (a++) + b + (++a) +(a++) and then print the values of a and b. I am a beginner, so if there is a mistake , please correct it and then solve and let me know my mistake as well as tell the values of "a" and "b" during the operation.
3 Respuestas
+ 3
Your other question also contains relevant answers re: undefined behavior.
https://www.sololearn.com/Discuss/807745/?ref=app
I thought there was at least one more Q&A with very similar format. Is this some class testing compiler-specific questions?
+ 2
You can't have (a++)+a before the += operator. It must be an assignable location.
+ 2
In my opinion, the biggest mistake is getting entangled with wierd sintax that makes your code wrong (as in this case) or potentially compiler dependant.