Step 1: Idea behind the test:
The test depends on a redox change. Tollen's reagent is ammoniacal silver nitrate, which gives $\mathrm{Ag^{+}}$ ions held in the complex $[\mathrm{Ag(NH_3)_2}]^{+}$. Only a reducing organic compound can turn these ions into silver metal.
Step 2: Which class of compound is a reducing agent here?
Look at the carbon of the functional group in each option. In an aldehyde the carbonyl carbon still holds one hydrogen, so it can be oxidised further to the acid level. In a ketone that carbon has two carbon neighbours and no hydrogen, so it cannot be oxidised without breaking the C-C bond, which a mild reagent cannot do.
Step 3: Half reactions for the aldehyde.
Oxidation: $\mathrm{RCHO + 3OH^{-} \to RCOO^{-} + 2H_2O + 2e^{-}}$
Reduction: $\mathrm{[Ag(NH_3)_2]^{+} + e^{-} \to Ag + 2NH_3}$
Multiplying the second half reaction by 2 and adding, we get the silver mirror reaction.
Step 4: Compare all four options.
Alcohol (option 1): a simple alcohol needs a stronger oxidant such as acidified dichromate, so no mirror.
Ketone (option 3): no hydrogen on the carbonyl carbon, so no mirror.
Carboxylic acid (option 4): the carbon is already fully oxidised, so no mirror.
Aldehyde (option 2): a shining silver layer appears on the glass wall when warmed gently.
Final Answer:
Only the aldehyde reduces the silver complex and gives the mirror, so the answer is option (2).
\[\boxed{\text{Aldehyde, option (2)}}\]