As per operator precedence rules, ++ operator has hight priorty than '*', but the printed value is 6 rather 9, i.e., operator '*' is taking precedence over ++. Any ideas?
Yes, if you think of i++ as a sort of function, and its return is the previous value of i. Then that give you 2++ which returns 2 then multiply it by 3 giving you 6, but the new value of i after the line is now 3.
i++ is a post fix, so any calculation that is to be done is done with the value before post fixing (adding one to i)