Quote:
What is the answer of the program , I got different answers from turbo cpp and dev cpp
There is no correct answer to this program, or all answers are correct.
It is a gray zone.
S=(R--) + (++R);
The compiler is free to rewrite this code in any way it see fit, no matter the way you read, understand, expect it. So each compiler makes its own truth.
So multiple increment/decrement operations on same variable make the code unpredictable from a compiler to another.
This is 1 of the pitfalls of C language.