Regarding output questions

I always get confused in question regarding output .
Could you please help me with some learning resources and practice Questions .

For example in this question , What will be associativity and precedence ?

#include
using namespace std;
int main() {
int x=5;
x+=++x+x++;
cout<<x;

}

You can see this video for the concept
https://www.youtube.com/watch?v=yRt-zYFJIvE . There are many more videos also on this topic.
For practise use this site https://www.sanfoundry.com/compilers-questions-answers-implementation-increment-decrement-1/

Can you please explain the output of this question

x += (++x + x++);
X = 5;
++x compute first and it bcome x =6
Now you have x=6
x+= (6+ x++);

Still bracket need to b solve first once the bracket expression is executed
x=7;
Now x=7
x= X + (6+7);
X = 7 + 6 + 7 ;
X= 20

Sorry for the late reply

I understood till x=6, but in x+=(6+x++); we will still have value of x as 6 as it is postfix .so it should be
x+=(6+6) . I didnt understand this part

Correct
Once the expression is solved x become 7
x++ - > value = 6;
But when it is added to previous x, its value become 7. So 7+7+6

once the value of x is assigned to 6 . how can it get changed to 7.
i.e. x+±>6 .The other value of x will be 7 (i got that part)

*x++ value- >6 …

See some videos on increment and decrement questions on you tube. Your concept is weak.
Then do it one time. And you will get to know
And generally these types of questions are compiler dependent. On sublime it is giving 20 but on visual studio it is giving 19

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.