The ratio of volumes is =10:40:50 =1:4:5
All the carbon from the hydrocarbon is in the CO2​. 10ml of hydrocarbon produces 40ml of CO2​ 1:4 ratio.
So, 1 mole of hydrocarbon has four moles of carbon.
All the H ends up in the water.
10ml of hydrocarbon produces 50ml water 1:5 ratio,
Each water molecule has 2 moles of H atoms. So, 1 mole hydrogen carbon compound has 10 moles of hydrogen. Which gives C4​H10​.