a) is alright.

As for b), suppose we have 3 socks of different colours. We add a sock of some colour to obtain a pair. Now if we add a sock of some different colour then we have two pairs. But if the new sock happens to be of the same colour as the previous one, then it has to be matched with yet another of the same colour. So the answer will be 4+1+1=6.

c) The first 16 socks can be black. Then we need to pick 3 more socks to get another matching pair. So we have 16+3 = 19

d) is correct.