When elements form compounds, the atom bonding results to a stable arrangement of electrons. This is true to covalent bonding where electrons are shared and in the ionic bonding where electrons are transferred in order to form a stable configuration that completes the octet rule (8 electrons).Answer is A.