Rank these operators in order they will be evaluated and explain why

I saw this on an exam a while back but never understood.
Please explain this one to me :slight_smile:



Thanks for your response guido. :slight_smile:
Could you please help me understand why?

:lol: Short answer - because that’s the way it is.

OK, seriously, I guess the precedence could have been decided arbitrarily. But I like to think that some thought was put into it, or at least copied from that found in other languages.

TBH I’ve never worried about it much, I prefer to force the issue by using parentheses. I find it a lot easier to read without needing to remember, and IMHO a few extra characters here and there won’t make a significant gain in performance to make it worth the hassle.