Step 1: Formation of aromatic compound A.
Heptane undergoes aromatization in the presence of \(MoO_3\).
\[
C_7H_{16}
\longrightarrow
C_6H_5CH_3
\]
Therefore,
\[
A=\text{Toluene}
\]
Step 2: Oxidation using chromic oxide in acetic anhydride.
This converts the methyl group of toluene into benzaldehyde.
\[
C_6H_5CH_3
\longrightarrow
C_6H_5CHO
\]
Step 3: Hydrolysis and further oxidation.
The aldehyde formed is ultimately converted into benzoic acid.
\[
C_6H_5CHO
\longrightarrow
C_6H_5COOH
\]
Hence Y contains the carboxylic acid functional group.
\[
\boxed{-COOH}
\]
\[
\boxed{\text{Answer = (C)}}
\]