Correct Answer - A
Compund `(D)` is least basic because the lone pair of electrons on `N` aton is delocalized into the ring to impart aromatic charater In rest of the compound the lone pair on `N` is localized (not involved in resonance ) In compounds `(A)` and ` C ` N is `sp^(3)` hydridized while compound `(B)` N is `sp^(2)` hybridized Since more the s-character more tightly bound the lone pair compounds `(B)` is less basic than `(A)` and `(C)` Due to the negative inductive effect of oxygen atom which pulls electrons away from the `N` atom compound `(C)` is less basic than `(A)` Thus the correct order of basicity is `AgtCgtBgtD`
.