SOLUTION —
Vol. of hydrocarbon = 20 mL
Contraction in vol. due to reaction =40 mL
Contraction in vol. KOH treatment } =40 mL
$\therefore \quad \text { Vol. of } CO _{2} \text { formed } =40 mL$
Let the hydrocarbon be $C _{x} H _{y}$.
Reaction : $C _{x} H _{y}( g )+\left(x+\frac{y}{4}\right) O _{2}( g )=x CO _{2}( g )+\frac{y}{2} H _{2} O (l)$
$\begin{array}{cccc}1 \text { vol. } & \left(x+\frac{y}{4}\right) \text { vol. } & x \text { vol. } & \text { ov. } \\ 20 mL & 20\left(x+\frac{y}{4}\right) mL & 20 x mL & \text { oml. }\end{array}$
$\therefore \quad 20\left(1+\frac{y}{4}\right)=40 \quad \therefore \quad 1+\frac{y}{4}=2 ;$ hence, $y=4$
$\therefore \quad$ Formula of hydrocarbon $= C _{2} H _{4}$.