White organic solid that forms CO2 with NaHCO3, forms a diazo dye withe beta-naphthol, and reacts with bromine water A white crystalline solid "X" gives the following chemical tests:


It liberates $\ce{CO2}$ with $\ce{NaHCO3}$
It forms a coloured dye in diazotisation and coupling with $\beta$-naphthol
With $\ce{Br2}$/$\ce{H2O}$, it forms a white precipitate of 2,4,6-tribomoaniline. 


"X" can be identified as: 



I thought that (d) could be the answer as COOH releases $\ce{CO2}$ from $\ce{NaHCO3}$, but can sulphonyl group release $\ce{CO2}$ from $\ce{NaHCO3}$?
(i) indicates presence of 'strong' acidic group: -(SO3H) and -(CO2H) since both are strongly acidic to protonate NaHCO3 and yield CO2.

(ii) indicates presence of Primary Amine which can fully undergo diazotization reaction and then with beta-naphthol form azo dye (coloured dye).

(iii) excess of bromine water forming s-tribromoaniline directly indicates that Option 2(b) is correct.

An article on point (iii): journal_iisc