The combustion reaction can be represented as
CxHy+(x+4y)O2→xCO2+yH2O
At STP, 1 mole of any gas occupies 22.4L
10mL of hydrocarbon, 50mL of water and 40mL of carbon dioxide corresponds to 0.45,2.23, and 1.79moles respectively.
Hence, the combustion of 1 mole of hydrocarbon will produce 5 moles of water and 4 moles of carbon dioxide.
Thus, the molecular formula contains 4 carbon atoms and 10 hydrogen atoms.
The hydrocarbon is C4H10 and the combustion reaction is
C4H10+6.5O2→4CO2+5H2O
x+y=4+10=14
Hence the Total number of carbon and hydrogen atoms in the hydrocarbon is 14.