The reactivity is directly proportional to the localized electron density and availability of the lone pair on the nitrogen atom:
- (ii) Phthalimide: The nitrogen lone pair is strongly delocalized across two adjacent electron-withdrawing carbonyl groups via resonance, making it the least nucleophilic.
- (i) Benzamide: The nitrogen lone pair is delocalized into one carbonyl group via amide resonance, leaving it highly unavailable but slightly more active than a di-acyl amide.
- (iii) p-Cyanoaniline: The lone pair is delocalized into the aromatic ring, which is further deactivated by the strong electron-withdrawing cyano group (−C≡N), reducing its overall nucleophilicity.
- (iv) Aniline: The nitrogen lone pair undergoes normal delocalization into an unsubstituted benzene ring, maintaining the highest nucleophilic character among the group.
Conclusion:
As the electron-withdrawing capability of the attached functional groups decreases, the availability of the nitrogen lone pair increases correspondingly.
Answer: Option B — (ii) < (i) < (iii) < (iv)