Probably glucose (I assume other than C and H, only oxygen is in the molecule)
Since the question does not provide any other element, I assume it contains oxygen (in addition to given hydrogen and carbon). I also assume that the compound components are provided in weight ratio (40% by weight for Carbon and 6.67% by weight for Hydrogen).
Carbon 12 grams/mol, Hydrogen 1 gram/mol, and Oxygen 16 grams/mol.
What is the oxygen weight? 100-40-6.67 = 53.33%
The formula will be
So the rest will be
Dividing the given percentage of C , H and O with their respective atomic masses and taking their ratio we get the ratio of number of atoms of the constituent elements present in the compound.
So the ratio of number of atoms of C , H and O in the compound will be
Hence the empirical formula of the compound is
let its molecular formula be
So calculated value of molar mass will be
But given molar mass is
So molecular formula of the compound is