Solution

Phthalic acid + $NH_3$ → diammonium phthalate $C_6H_4(COO^-NH_4^+)_2$ On heating, it loses $2H_2O$ to give phthalamide $C_6H_4(CONH_2)_2$. On strong heating, phthalamide loses $NH_3$ to give phthalimide. So the major product is phthalimide.

Concept phthalic acid with ammonia on strong heating

Aldehydes, Ketones and Carboxylic Acids in past papers

91 questions from this chapter have appeared across 27 exam years.