Operator Associativity Each operator has a default associativity Associativity of operator + is LR sum = x + y + z; sum = (x + y) + z; // statement meaning identical to first Associativity of operator = is RL a = b = c; // valid statement a = (b = c); // identical meaning Except for assignment operator=, binary operators associate LR
sum = x + y + z; sum = (x + y) + z; // statement meaning identical to first
a = b = c; // valid statement a = (b = c); // identical meaning