In organic reactions, the presence of HI or concentrated acids often leads to substitution or addition reactions, especially in the case of functional groups like hydroxyl and methoxy.
(a) Reaction of methoxy group (\(\text{OCH}_3\)) with HI yields methanol and HI. The reaction is shown as: \[ \text{OCH}_3 + \text{HI} \longrightarrow \text{CH}_3\text{OH} + \text{HI} \] (b) Reaction of hydroxyl group with concentrated nitric acid converts it to a nitro group. The reaction is: \[ \text{OH} + \text{conc. HNO}_3 \longrightarrow \text{NO}_2 + \text{H}_2\text{O} \] (c) Reaction of magnesium bromide with formaldehyde produces a magnesium alkoxide. The reaction is: \[ \text{MgBr} + \text{HCHO} \longrightarrow \text{C}_6\text{H}_5\text{CH}_2\text{OH} + \text{MgBr}_2 \]