Identify the cations and anions in each case and write relevant equations wherever necessary.
(i) A white crystalline solid on heating swells and gives off colourless vapours, which condense to form a colourless liquid X. The X turns anhydrous copper sulphate solution blue. The flame test shows the flame as persistent golden yellow. When the solution of solid is treated with HCl, it gives off a colourless gas Y which turns lime water milky.
(ii) A blue solid gives a non-persistent green flame during the flame test. When the solid is heated strongly, it leaves behind a white residue. The residue on treating with few drops of water changes to blue colour.
(iii) A white solid gives a non-persistent brick red flame. On treating with dilute sulphuric acid, it gives off a colourless gas which turns acidified potassium dichromate solution green.
(iv) A white solid gives a non-persistent black colour. On treating with dilute sulphuric acid, it gives off a highly offensive smell. The gas turns lead acetate paper black.