The correct option is B Basic strength of (d) is higher than that of (c)
In (a) lone pair of nitrogen is not available because of delocalisation
Similarly, the lone pair in pyrrole i.e. (c) is also delocalised in making the compound aromatic, making it least basic (as aromaticity is the biggest stabilization factor).
So, basic strength of (a) and (c) is less than that of (b) and (d)
Between (b) and (d) :
Due to electron donating (+I) effect of cyclic chain attached, there is more electron density on nitrogen in case of (d).
So, basic strength of (b) is less than that of (d)