Solution:
Concept: The number of valence electrons tells us how an atom bonds: 1 to 3 means a metal that loses electrons; 5 to 7 a non-metal that gains (or shares) electrons; 4 means the atom shares electrons. The formula is found by making the electrons lost equal to the electrons gained, or by matching each shared electron with a partner.
Step 1 — Identify each element from its configuration.
We add up the electrons to get each atomic number and read the valence electrons:
| Element | Configuration | Atomic number | Valence electrons | Element is | Behaviour |
|---|
| A | 2, 8, 8, 2 | 20 | 2 | calcium | metal: loses 2 |
| B | 2, 6 | 8 | 6 | oxygen | non-metal: gains 2 |
| C | 2, 8, 7 | 17 | 7 | chlorine | non-metal: needs 1 |
| D | 2, 4 | 6 | 4 | carbon | shares 4 |
Step 2 — (a) 1. Formula of the compound of A and B.
A loses 2 electrons and B gains 2, so one A gives both its electrons to one B. The ions A2+ and B2− combine 1 : 1, so the formula is AB (an ionic compound, like calcium oxide, CaO).
Step 3 — (a) 2. Formula of the compound of D and C.
D needs 4 electrons and each C needs 1, so D shares one pair with each of four C atoms. The formula is DC₄ (a covalent compound, like carbon tetrachloride, CCl₄).

Step 4 — (b) Decide which element shows catenation.
Catenation is the ability of atoms of the same element to join to one another in long chains or rings. Carbon (D) does this best, because it has 4 valence electrons and forms strong C–C covalent bonds, so D shows catenation.
Watch out: In (a) 2 the question names D first; the formula is still DC₄, with one D and four C atoms.
Therefore, (a) 1. A and B form AB; 2. D and C form DC₄; (b) element D (carbon) exhibits catenation.