>can u plz explain that when is the order of precedense will be right to left?
Are you deaf?
Look at the post #2 and try to accept that what ever niek has said is actually true.
Your program is suffering from
undefined behaviour. All that means to you is that 'anything' can happen when you run the program.
There is a FAQ on Bjarne Stroustrup's FAQs(
http://www.research.att.com/~bs/bs_f...aluation-order) and also on Marshal Cline's FAQs(
http://www.parashift.com/c++-faq-lit...html#faq-39.15)
Try to read and understand them.
In simple term:
1. Sequence point is a point of time while executing your code at which all the variables have defined values.
2. Any operation done which alter the value of a variable more than once in between only a pair of consecutive sequence point leads to
undefined behaviour.
No doubt, there are teachers who put forward these kinds of question trying to show off how tricky their questions are . Actually, all they are doing is teaching their student to depend on studying implementation specific behaviour.
Regarding, the use of void main, conio.h and clrscr(), read
http://siddhant3s.elementfx.com/