For an ideal gas, the change in internal energy depends only on the change in temperature and not on the path taken. Since the gas undergoes the same change of state from A to B, the change in internal energy is the same in all four processes. This is a fundamental result of the first law of thermodynamics, which states that internal energy is a state function. Therefore, the correct answer is (B).