Testing for carbonates - check for CO2.
You can test to see if a gas is carbon dioxide by bubbling it through limewater. If it is carbon dioxide, the limewater turns milky.
You can use this to test for carbonate ions (CO32-), since carbonates react with dilute acids to form carbon dioxide.
acid + carbonate --> salt + water + carbon dioxide
To test for sulfates and chlorides -
Sulfate ions, SO42-.
To test for sulfate ions, add dilute HCl, followed by barium chloride solution, BaCl2.
A white precipitate of…