we can use combined gas laws to solve for the volume of the gas

where P - pressure, V - volume , T - temperature and k - constant

parameters for the first instance are on the left side and parameters for the second instance are on the right side of the equation
T1 - temperature in Kelvin - 20 °C + 273 = 293 K
T2 - 40 °C + 273 = 313 K
substituting the values

V = 17.8 L
volume of the gas is 17.8 L