both constructions are equal, first one is just shorter syntacs of the second one
The compiler will optimize them to the same code.
Quoting conradcaThe compiler will optimize them to the same code.
Excepting when b and a are volatile.
An interesting exercise would be writing the code to do both and then reviewing the assembly generated by the compiler.Assuming this is not a complex data type, don't forget:a=c;b=c;