(a) Isothermal process : q = - w (b) Cyclic process : q = - w (c) Adiabatic process: $\Delta E$ = -w (d) Expansion of a gas into vacuum : $\Delta E$ = q