Which is more widely used and acceptable about C operators? -
though 4 * (num / 6)
is more easy understand, num / 6 * 4
right because operator *
, /
in same priority, , associativity left right.
but, better, , more used / acceptable?
although both correct, parenthesis friend. stick it. paranthesization makes look easier understand fellow programmers reduces chances of logical errors specially when not sure precedence of operators.
c operators priority associative
No comments:
Post a Comment