We know entropy is d measure of degree of randomness. So when entropy >0 heat is absorbed and entropy < 0 heat is evolved and in carnot engine assumption heat is neither evolved nor absorbed,it is being produced in the system so entropy is 0.also 1st & 3rd is isothermal expansion &2nd & 4th is adiabatic.so entropy is same.