Step 1: Know the group wanted.
We need the compound that carries the carboxyl group, written as $-COOH$.
Step 2: Check each functional group.
Ethanol has $-OH$, an alcohol. Diethyl ether has an $-O-$ bridge. Formaldehyde has $-CHO$, an aldehyde. None of these is a carboxyl group.
Step 3: Look at acetic acid.
Acetic acid is $CH_3COOH$. It clearly carries the $-COOH$ group at the end.
Step 4: Pick the answer.
Only acetic acid has the carboxyl group.
\[ \boxed{\text{Acetic acid}} \]