Hint:Real gases and non-ideal gases used molecules interact with each other and they also occupy space. They do not follow ideal gas law. An ideal gas is a hypothetical gas composed of random point particles. It follows ideal gas law. It ignores intermolecular forces and volume of the atoms.
In case if any real gas expands from high pressure to low pressure there is a change in temperature. It is adiabatic and it is called the Joule Thomson effect. The temperature of non-ideal gas increases or decreases letting the gas expand really at constant enthalpy. When an ideal gas expands freely at constant enthalpy the temperature of the gas may increase or decrease. The increase and decrease in temperature depend on initial temperature and pressure.
At any pressure, for non-ideal gas there is a temperature called inversion temperature, above which expansion at constant enthalpy causes temperature to rise and below which expansion at constant enthalpy causes temperature to decrease. Inversion temperature for most gases is high that is above room temperature and most gases at this temperature and pressure conditions are cooled by isenthalpic expansion.
For an ideal gas, there is neither attraction nor repulsion since there are no intermolecular forces. Hence when an ideal gas undergoes unrestrained expansion no cooling occurs because the molecules exert no attractive forces on each other.
Therefore, the correct option is B.
Ideal gases obey ideal gas equation and real gases obey Vander Waals equation. The real gas equation is a modification of the ideal gas equation with two extra variables for intermolecular forces and volume occupied.