printf("%d %d %d",i++,++i,i--);
Ans the above question with description?
5 5 4
5 5 4 the assignment starts from right to left. So first will be i-- will be evaluated. As in case of post decrements, the value which is printed is 5 and later on it becomes 4. Next i is incremented so it will become 5 & later is post incremen so its 5
5 7 7 would be the out put cause in 1st i++ it will post the value of i then increments the value of i by 1, in this i become 6,next ++i is preincrement the value of i now i become 7 and then it is printed,next i-- post the value to print 7, then decrmt i