Option (B) is correct.
Explanation: A gas has no single heat capacity; the value depends on the process, because the heat needed for a given temperature change depends on how much work is done at the same time.
Process X (isothermal): ΔQ=500 J but ΔT=0. All the heat goes into work, none into internal energy, so
C=1.0×0500⇒C→∞
Any amount of heat leaves the temperature unchanged.
Process Y (adiabatic): ΔQ=0 but ΔT=40 K; the temperature rises because of the work done on the gas, so
C=1.0×400=0
Cv and Cp are just the values of C for two particular processes; isothermal and adiabatic processes give the special values ∞ and 0.
(A) is wrong: the two are swapped; it is the isothermal process that absorbs heat with no rise in temperature.
(C) is wrong: neither process is at constant pressure or constant volume, so neither Cp nor Cv applies.
(D) is wrong: in X heat is absorbed with no temperature change, so C there cannot be zero.