Solution:
Concept: Stoichiometry: the coefficients of a balanced equation give the ratio of moles in which substances react and form. So we change the given quantity to moles (mass ÷ molar mass, or volume at S.T.P. ÷ 22.4 L), use the mole ratio, and change back to mass (moles × molar mass) or volume (moles × 22.4 L at S.T.P.).
Step 1 — Read the mole ratio.
Electrolysis splits water into hydrogen and oxygen.
2H2O→2H2+O2
So 2 moles of water give 1 mole of oxygen, and 1 mole of water gives 0.5 mole of oxygen.
Step 2 — Find the mass of oxygen.
The molar mass of O₂ is 32 g.
mass of O2=0.5×32 g=16 g
Step 3 — Find the volume at S.T.P.
Each mole of gas occupies 22.4 L at S.T.P.
volume of O2=0.5×22.4 L=11.2 L
(The hydrogen formed is 1 mole, 22.4 L, twice the volume of the oxygen.)

Watch out: Use the ratio 2 : 1 for H₂O : O₂; one mole of water does not give one mole of oxygen.
Therefore, 16 g of oxygen is evolved, which occupies 11.2 litres at S.T.P.