Let empirical formula for hydrocarbon is CxHy
it will undergo combustion as
CxHy + (x + y/4) O2 ---> xCO2 + (y/2 )H2O
Given that mass of CO2 produced = 9.69 g
So moles of CO2 produced = 9.69 / 44 = 0.22 moles
So moles of carbon present = 0.22 moles
mass of H2O produced = 4.96 g
Moles of H2O produced = mass / molar mass = 4.96 / 18 = 0.28 moles
So moles of H present = 2 X 0.28 = 0.56 moles
Let us divided the moles of each with lowest value of moles
Moles of Carbon = 0.22 / 0.22 = 1 moles
moles of H = 0.56 / 0.22 = 2.55
Multiplying with two to get whole number
the ratio of carbon and hydrogen will be : C:H = 2:5
empirical formula : C2H5