How to identify the structure of an organic acid based on its reactivity, mass and NMR spectrum?
I'm at a loss about how to deduce the molecular formula.


Compounds containing only C, H, and O have a certain number of hydrogens (h) compared to the number of carbons (c).

If there are no double bonds and no rings, h = 2c + 2. This is true for linear chain alkanes. Adding oxygens to those (hydroxyl groups, ethers) does not change the number of hydrogens. Turning the linear chain to a branched structure does not change the number of hydrogens.

For every double bond you add, you lose two hydrogens (think of it as turning sigma bonds to hydrogen into pi bonds between the heavier atoms). For every ring you close, you lose two hydrogens (one additional C-C bond instead of each carbon bound to a hydrogen, for example).

So for molecules with double bonds (d) and rings (r), you get:

h = 2c + 2 - 2d - 2r


  All you know is that D contains a C=C, benzene ring and most likely a -COOH group 


So the benzene ring accounts for three double bonds and a ring, the C=C for a double bond and the -COOH for a double bond (C=O). At this point, we don't know if there are even more double bonds or rings, so we have d >= 5 and r >= 1 and the following inequality

h = 2c + 2 - 2d - 2r &lt; 2c - 10

So the molecule will not have the maximum possible number of hydrogen atoms (2c + 2) but much less.


  $M_r(\ce{C_xH_y})= \pu{116 g mol^{-1}}$


Just like porphyrin said in his comment, there is only one solution to x and y that makes chemical sense: 9 carbons and 8 hydrogens. You don't even have to think about the rings and double bonds like I discussed above, but it is a nice check. For a hydrocarbon with 9 carbon atoms we would expect 20 hydrogen atoms in the absence of rings and double bonds. We have 12 less than that, so the number of rings and double bonds in the molecules is 6. That fits with the expectation of a benzene ring (accounting for 4), another C=C double bond (1 more) and a carboxylate group (1 more).