Consider the following reaction sequence : 4-aminobenzonitrile is treated with (i) AlH(i-Bu), (ii) HO to give 'A', which with CHCHO / dil NaOH, Δ gives B (Major Product).
The product 'B' is :

From the JEE Main 2022 · 29 Jul · Shift 1 paper. Try it, check your answer, then read the worked solution below.
Consider the following reaction sequence : 4-aminobenzonitrile is treated with (i) AlH(i-Bu), (ii) HO to give 'A', which with CHCHO / dil NaOH, Δ gives B (Major Product).
The product 'B' is :

Try it yourself first, then check your working against this.
Worked solution
DIBAL-H reduces the nitrile to the aldehyde: 4-aminobenzaldehyde. Cross aldol with acetaldehyde (the aryl aldehyde has no α-H) then dehydrates: 4-aminocinnamaldehyde, .
(B)
Concepts used: DIBAL-H, cross aldol
Every past question tagged to the same part of the syllabus, with solutions.
Past questions on the same topic (Aldol and related condensations), each with a worked solution.
Timed, in the real format, and marked the moment you submit.