Solution:
Concept: Gay-Lussac's law of combining volumes: when gases react, they do so in volumes that bear a simple whole-number ratio to one another and to the volumes of any gaseous products, all measured at the same temperature and pressure. The ratio is read from the coefficients of the balanced equation.
Step 1 — (a) Read the volume ratio.
The balanced equation shows that 2 volumes of carbon monoxide react with 1 volume of oxygen to give 2 volumes of carbon dioxide.
2CO+O2→2CO2
So the oxygen needed is half the volume of carbon monoxide.
Step 2 — (a) Find the oxygen needed.
We take half of 100 litres, because the ratio CO : O₂ is 2 : 1.
volume of oxygen=21×100 litres=50 litres
Step 3 — (b) Find which gas is in excess.
From the equation, 2 volumes of hydrogen react with 1 volume of oxygen.
2H2+O2→2H2O
So 200 cm³ of hydrogen needs only half its volume of oxygen:
oxygen used=21×200 cm3=100 cm3
Since 150 cm³ of oxygen is present, all the hydrogen reacts and oxygen is left over.
Step 4 — (b) Find the oxygen left.
We subtract the oxygen used from the oxygen taken.
oxygen left=150−100 cm3=50 cm3

Watch out: In (b) first find which gas runs out (the limiting gas). Here hydrogen is used up, so the leftover gas is oxygen.
Therefore, (a) 50 litres of oxygen are required, and (b) 50 cm³ of oxygen remains unreacted.