Answer:
Step-by-step explanation:
Ionic compound : These are the compounds in which the atoms are bonded through the ionic bond. The ionic bond are formed by the complete transfer of the electrons.
That means, the atom which looses the electron is considered as an electropositive atom and the atom which gains the electron is considered as an electronegative atom.
And these bonds are formed between one metal and one non-metal.
From the given pairs of elements, potassium and sulfur, magnesium and chlorine are form ionic compound because potassium and magnesium are the metals and sulfur and chlorine are the non-metals. So, they can easily form ionic compound by the complete transfer of electrons.
While the other pairs, sodium and potassium are the metals, nitrogen and iodine, chlorine and bromine, helium and oxygen are the non-metals. They do not form ionic bond.