KCl, NaCl, and MgO are all examples of ionic solids. In these compounds, there is a transfer of electrons between the metal and non-metal atoms, resulting in the formation of positive and negative ions. These ions are held together by strong electrostatic forces, known as ionic bonds.In KCl, potassium K loses one electron to become K+ and chlorine Cl gains one electron to become Cl-. In NaCl, sodium Na loses one electron to become Na+ and chlorine Cl gains one electron to become Cl-. In MgO, magnesium Mg loses two electrons to become Mg2+ and oxygen O gains two electrons to become O2-. In each case, the oppositely charged ions are attracted to each other, forming a lattice structure typical of ionic solids.