When an acid reacts with carbonate or hydrogen carbonate, it gives carbon dioxide which turns lime water milky. On the other hand, alcohol does not give carbon dioxide on reaction with carbonate or hydrogen carbonate. Thus, the reaction with carbonate or hydrogen carbonate can be used to distinguish between carboxylic acid and alcohol.