Step 1: Relate wavelength to speed.
For any wave, $\lambda = \dfrac{v}{f}$, where $v$ is the wave speed and $f$ the frequency.
Step 2: Identify what sets the frequency.
The frequency is fixed by the source and stays the same as the sound moves into a new medium.
Step 3: Write the speed of sound in a gas.
By the Newton-Laplace relation, \[ v = \sqrt{\frac{E}{\rho}}, \] where $E$ is the elasticity (bulk modulus) and $\rho$ the density of the gas.
Step 4: Combine the two.
Since frequency is fixed, the wavelength tracks the speed: \[ \lambda = \frac{1}{f}\sqrt{\frac{E}{\rho}}. \]
Step 5: Spot the controlling factors.
The only medium properties in this expression are the elasticity $E$ and the density $\rho$.
Step 6: Conclude.
Therefore the wavelength of sound in a gas depends on the density and elasticity of the gas, option (C). \[ \boxed{\text{density and elasticity of the gas}} \]