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) The reaction of methoxy group (\(\text{OCH}_3\)) with HI results in the formation of methanol and iodoform: \[ \text{OCH}_3 + \text{HI} \longrightarrow \text{CH}_3\text{OH} + \text{HI} \] (b) The reaction of hydroxyl group with concentrated nitric acid leads to the formation of nitro group: \[ \text{OH} + \text{conc. HNO}_3 \longrightarrow \text{NO}_2 + \text{H}_2\text{O} \] (c) The reaction of magnesium bromide with formaldehyde results in the formation of a magnesium alkoxide: \[ \text{MgBr} + \text{HCHO} \longrightarrow \text{C}_6\text{H}_5\text{CH}_2\text{OH} + \text{MgBr}_2 \]