Due to ortho-effect, (I) and (II) are stronger acid than (III) and (IV). Due to two ortho hydroxyl groups in (I), it is stronger acid than (II). (III) is a stronger acid than (IV) because at m-position, −OH group cannot exert its +R effect but can only exert its –I effect while at p-position, −OH group exerts its strong +R effect. Thus, the correct order of acidity is
I > II > III > IV.