The order of basicity among the following compounds is

From the JEE Advanced 2017 · Paper 2 paper. Try it, check your answer, then read the worked solution below.
The order of basicity among the following compounds is

Try it yourself first, then check your working against this.
Worked solution
Rank the protonated forms by how well they spread the positive charge:
Order: IV > I > II > III.
(C)
Concepts used: resonance-stabilised guanidinium and amidinium, imidazole lone pair partly in the aromatic system
Every past question tagged to the same part of the syllabus, with solutions.
Past questions on the same topic (Acidity and basicity), each with a worked solution.
Timed, in the real format, and marked the moment you submit.