Answer is : (c) IV < I < III < II
Among the given compounds IV will have the least basicity as the lone pair on nitrogen takes part in resonance and will not be available for donation. Compound I will have more basicity than IV, because of the availability of lone pair of NH2 group. But its basicity will be less than II and III because of the − I effect of NO2 which decreases the basicity of aniline.
Now between compounds II and III, II will be most basic. This is because it is an aliphatic amine and also in III, the nitrogen is present within the ring, so its electron will not be as much available as in II.
Thus, the order of basicity will be,
IV < I < III < II