A hydrocarbon gas contains 92.26% carbon and

7.74% hydrogen, by mass. At one atmosphere
pressure and 25°C, 4.20 L of the gas has a mass of
4.47 g. What is the molecular formula for the
compound?

1 answer

Take a 100 g sample to give you
92.26 g C
7.74 g H.
Convert to moles. moles = grams/molar mass
Look at the moles and find the ratio of the elements to each other with the smallest number being 1.00. The easy way to do that is to divide the smaller number by itself and follow by dividing the other number by the same small number. Round to whole numbers. That will give you the empirical formula.
To find the molar mass, use PV = nRT and solve for n. Then n = grams/molar mass and solve for molar mass.
To find the molecular formula, that is
(mass empirical formula)*x = molar mass
Solve for x and it it as (empirical formula)x.
Post your work if you get stuck.