Carbon dioxide is acidic in nature and potassium hydroxide is a strong base. Hence, carbon dioxide reacts with potassium hydroxide to form potassium carbonate and water as
`2KOH+CO_(2)toK_(2)CO_(3)+H_(2)O`
Thus, the mass of the U-tube containing KOH increases. This increase in the mass of U- tube gives the mass of `CO_(2)` produced. From its mass, the percentage of carbon in the organic compound can be estimated.