nope, a=1, b=0 - (most will usually assume/guess, a=0, b=1 )
basically its because the assignment operator actually returns a reference, not an lvalue.
which means you can also do amusing things like this
(A=5)++;
which will set A to 6
(now to be clear this is because the object A is returned from the assignment operator, which means the ++ works on it, this is i.e. its not being treated as A=(5++), so (A=5)=4; is also valid syntax)
in fairness, this stuff never gets taught (nor is in books)... its something you tend to find out if you 'play' with language syntax...
in this particular case, this should become 'evident' when you learn to overload the assignment operator, you should really use
class A {
public:
A& operator=(const A&);
}
see how it returns a reference... so once you know this, its logical (I think) to ask yourself the question... does this apply to built in types (and the answer is yes, hence all the above syntax)
... the reasoning, is of course its more efficient to return a reference, than to start copying values around.
(in K&R C it was an r-value, so you could not do this, not really so evident, as you cant overload types in C )