int a=b=c=10; //invalid statement
But following are valid statements
int a,b,c;
a=b=c=10;
First one is invalid as b assigned to a even before b got its value.
But the second case is valid as equal(=) sign is having right associative i.e "=" sign will start getting preference from the right side.
My question is: why doesn't Right Associativity apply in the first case? Does it mean that Associativity doesn't work with the declaration statement? I need more clarity on this.