How the fact that postfix unary having higher precedence than prefix would group differently an expression? [closed]

For instance in the expression a+b*c, applying precedence (grouping) we get a+(b*c) because * has higher precedence than +. Nonetheless, I'm struggling to understand the case in which we'd decide to group differently some expression due to the fact that, say postfix ++ had higher precedence than prefix ++. The only thing that came up to my mind was a+++b which becomes (a++)+b, but I'm not sure if this would be the best example to illustrate precedence hierarchy between these two operators (even if it serves such purpose).

Jan 14, 2025 - 18:11
 0
How the fact that postfix unary having higher precedence than prefix would group differently an expression? [closed]

For instance in the expression a+b*c, applying precedence (grouping) we get a+(b*c) because * has higher precedence than +. Nonetheless, I'm struggling to understand the case in which we'd decide to group differently some expression due to the fact that, say postfix ++ had higher precedence than prefix ++. The only thing that came up to my mind was a+++b which becomes (a++)+b, but I'm not sure if this would be the best example to illustrate precedence hierarchy between these two operators (even if it serves such purpose).

What's Your Reaction?

like

dislike

love

funny

angry

sad

wow