Among the following, ionic compound is formed between:
C and O
C and H
N and H
Mg and Cl
Ionic bond is formed between a metal and non-metal.
Explain the formation of an ionic compound between metal and a non-metal by transfer of electrons with Mg as the metal and Cl as a non-metal to illustrate your answer.