Answer : The compound is formaldehyde
.
Solution :
If percentage are given then we are taking total mass is 100 grams.
So, the mass of each element is equal to the percentage given.
Mass of C = 42.20 g
Mass of H = 6.50 g
Mass of O = 51.30 g
Molar mass of C = 12 g/mole
Molar mass of H = 1 g/mole
Molar mass of O = 16 g/mole
Step 1 : convert given masses into moles.
Moles of C = 
Moles of H = 
Moles of O = 
Step 2 : For the mole ratio, divide each value of moles by the smallest number of moles calculated.
For C = 
For H = 
For O = 
The ratio of C : H : O = 1 : 2 : 1
The mole ratio of the element is represented by subscripts in empirical formula.
The Empirical formula = 
Hence, from this we conclude that the compound is formaldehyde.