Answer
Molecular formula = $C_{8}H_{10}N_{4}O_{2}$ .
Empirical formula = $C_{4}H_{5}N_2O$ .
Work Step by Step
In caffeine, there are eight Cabon atoms, two oxygen atoms, four Nitrogen atoms, and ten hydrogen atoms.
Thus the molecular formula is $C_{8}H_{10}N_{4}O_{2}$ .
The empirical formula is the simple whole-number ratio of the molecular formula.
The above molecular formula when divided completely by two we get a simple whole-number ratio.
Empirical formula = $C_{4}H_{5}N_2O$ .