The correct option is
C II > IV > III > I
In general, whenever a group is
present at the ortho position
of benzoic acid, irrespective of its nature (EDG or EWG), it
increases the acidic strength as compared to benzoic acid
itself.
Hence, (II) is more acidic than others due to ortho effect.
Also (II) has SIR effect along with electrostatic force of attraction between
O− and
N+. This will make the II more acidic than I, III and IV.
Comparing I, III and IV:
NO2 in para position show -R effect and will decrease the electron density of carboxylate ion which will make it more stable than I and III.
In III, the -I effect of
NO2 group will stabile the conjugate base. Hence it will be more stable than I but less stable than IV.
Stability of conjugate base
∝ Strength of acid
So, the decreasing order of acidic strength is II > IV > III > I.