Explanation:
Use the number of electrons in valence shell to find the maximum valence shown by the element.
(a) $\mathrm{C}$, atomic number $=6,1 \mathrm{~s}^2, 2 \mathrm{~s}^2, 2 \mathrm{p}^2$
$\because$ it has 4 electrons in valence shell
$\therefore$ its maximum valency is 4
(b) Barium belongs to group 2 (at. no=56)
$\because$ it has 2 electrons in valence shell
$\therefore$ its maximum valency is 2 .
(c) Nitrogen (at. no. 7) $=1 \mathrm{~s}^2, 2 \mathrm{~s}^2, 2 \mathrm{p}^3$
$\because$ valence shell has 5 electrons
$\therefore$ it can have maximum valency of 5 .
(d) Sulphur (at. no. 16) $1 \mathrm{~s}^2, 2 \mathrm{~s}^2, 2 \mathrm{p}^6, 3 \mathrm{~s}^2, 3 \mathrm{p}^4$
$\because$ valence shell has 6 electrons
$\therefore$ it can have maximum valency of 6 .
$\therefore$ sulphur shows maximum valency among given choices.