(a) Baking powder is a sodium salt called sodium bicarbonate (NaHCO3). It is a mixture of baking soda (sodium hydrogencarbonate) and a mild edible acid such as tartaric acid. When baking soda mixes with water, the sodium hydrogencarbonate reacts with the tartaric acid to produce carbon dioxide gas. The carbon dioxide gas produced gets trapped in the wet dough made for baking a cake or bread, and bubbles out slowly, and the cake or bread becomes soft and spongy.
(b) In addition to sodium hydrogencarbonate, baking powder contains tartaric acid (X). Tartaric acid is added to baking powder to neutralise the bitter taste that baking soda produces in the cake. Also, carbon dioxide, which makes the cake fluffy and soft, is produced only when the tartaric acid reacts with the sodium hydrogencarbonate or baking soda, in the presence of water.