There is an answer given for a question why
(A%2==0)?A=0:A=1 gives error.
The thing I don't understand that when do we use (precedence and associativty) and we
use C grammar to parse the expression ?
There is an answer given for a question why
(A%2==0)?A=0:A=1 gives error.
The thing I don't understand that when do we use (precedence and associativty) and we
use C grammar to parse the expression ?
Always use the grammar to parse expressions.
Precedence and associativity are derived from the grammar, they are not the rules. Many precedence tables are over-simplifications that don't work in some obscure corner cases.