Step 1: Compare the two compounds.
Benzoic acid \((C_6H_5COOH)\) is a carboxylic acid. Ethyl benzoate \((C_6H_5COOC_2H_5)\) is an ester.
Step 2: Pick a property that differs.
A carboxylic acid is acidic enough to react with a weak base like sodium hydrogen carbonate, but an ester is not.
Step 3: Carry out the test.
Add a small amount of aqueous sodium hydrogen carbonate \((NaHCO_3)\) to each compound.
Step 4: Observe the result.
Benzoic acid reacts and gives brisk effervescence of \(CO_2\) gas. Ethyl benzoate does not react, so there is no effervescence.
\[C_6H_5COOH + NaHCO_3 \rightarrow C_6H_5COONa + H_2O + CO_2\uparrow\]
Step 5: Draw the conclusion.
The compound that gives bubbles of gas is benzoic acid.
Answer: On adding aqueous \(NaHCO_3\), benzoic acid gives brisk effervescence of \(CO_2\), while ethyl benzoate gives no reaction. This distinguishes the two.