what is the output: x=15; printf("%d %d %d",x==15,x=30,x==30);
Test it in multiple compilers, you will have different output. Even Code Playground warned you the risk of undefined behaviour. Another case of sequence point violation it seems.
What you expecting output would be?
Amit Dubey you have a code playground to check the answer. So kindly use it. If you do not understand then ask your doubt here.
Then You are right... You expected the right.. may vary on different compilers. here order of evaluation as you expecting happening is right to left so the output is 0 30 0. edit: Amit Dubey your wel come .
yes you are right ipang😊 but i also used it in code blocks, then in cpp droid ..the output is same..
I got 1 30 1 in CDroid Amit Dubey And in Code Playground I got that sequence point warning. What can I say? 😁
If you just want to know the output, just test it out yourself, that's how one learns. If you're looking for some explanation, please be more clear about it. Happy testing!
expecting output : 0 30 0