Carbon dioxide produced by action of dilute hydrochloric acid on potassium hydrogen carbonate is moist whereas that produced by heating potassium hydrogen carbonate is dry

Carbon dioxide produced by action of dilute hydrochloric acid on potassium hydrogen carbonate is moist whereas that produced by heating potassium hydrogen carbonate is dry. What would be the difference in the composition of carbon dioxide in the two cases? State the associated law.

Answer:
The composition of C02 in both the cases would be same, i.e., the carbon and oxygen will combine in the same ratio 1:2.
The law associated is law of constant proportion.