The major product of the following reaction is

From the JEE Advanced 2017 · Paper 2 paper. Try it, check your answer, then read the worked solution below.
The major product of the following reaction is

Try it yourself first, then check your working against this.
Worked solution
This closes a six-membered ring containing N=N: a hydroxy-benzo[c]cinnoline with the OH para to the new C-N bond. That is structure (C).
(C)
Concepts used: diazotisation, intramolecular azo coupling para to phenoxide
Every past question tagged to the same part of the syllabus, with solutions.
Past questions on the same topic (Diazonium salts), each with a worked solution.
Timed, in the real format, and marked the moment you submit.