The correct option is D (I)>(III)>(II)>(IV)
(I) It is a secondary carbocation stabilized by resonance. Also, it is the most stable carbocation among the four.
(II) It is a simple secondary carbocation.
(III) It is a primary carbocation stabilized by resonance.
(IV) It is a primary carbocation.
We know that the stability of carbocation follows the order
3o>2o>1o. However, resonace stabilized primary carbocation is more stable than secondary carbocation.