Hint: Ionic compounds are formed by the transfer of electrons.
Step 1:
Metals are good electron donors and non-metals are good electron acceptors. So, the bonds form between metal and non-metal are ionic bonds, and the compound formed is called an ionic or electrovalent compound.
Example: For KCl ionic compound where K is metal and Cl is non-metal.
K→K++e− ----- 1
12Cl2+e−→Cl− ----- 2
-----------------------------------------
Overall reaction: K+12Cl2→KCl
Two non-metals form bonds by sharing electrons and such bonds are called covalent bonds and the compounds formed are called covalent compounds.
Step 2:
(i) KCl: K is a metal and Cl is a non-metal. So, the bond form between them is an ionic bond and the compound form is an ionic compound.
(ii) HCl: H is a non-metal and Cl is also a non-metal. So, the bond form between them is a covalent bond and the compound form is a covalent compound.
(iii) CCl4: C is a non-metal and Cl is also a non-metal. So, the bond form between them is a covalent bond and the compound form is a covalent compound.