let the hydrocarbon is CxHy
the combustion equation will be:
CxHy + (x + y/4)O2 ---> xCO2(g) + y/2H2O
So here
12x grams of carbon will give 44x grams of carbondioxide (molar mass of CO2 is 44)
y grams of hydrogen will give 9y grams of water
Or if 44g of carbondioxide is formed the mass of carbon = 12g
if 1 g of CO2 is formed the mass of carbon = 12/ 44
if 0.1101 g of CO2 is formed the mass of carbon = 0.1101 X 12 / 44 =0.03 grams
Moles of Carbon = mass / atomic mass = 0.0025 moles
if 9g of water is present the mass of hydrogen = 1 gram
if 1g of water is formed the mass of hydrogen = 1 / 9
If 0.0360g of water is formed the mass of hydrogen = 0.0360 / 9= 0.004
Moles of Hydrogen = 0.004 /4 = 0.004
let us divide the moles of each C and H by lowest 0.0025 moles
moles of C = 1
Moles of H = 0.004/ 0.0025 = 1.6
Let us multiply both with 5
Moles of C : Moles of H = 5 : 8
so empirical formula = C5H8