Compounds are formed by bonding atoms of two or more different elements through chemical reaction. Atoms are bonded by losing or gaining electrons in ionic bonding and by sharing electrons in covalent bonding between two atoms participating in the bond formation. For example, one molecule of the compound water is formed by bonding two atoms of hydrogen and one atom of oxygen by sharing electrons between the atoms and forming covalent bonds. Therefore, compounds are created by losing, gaining or sharing electrons between other atoms.
(Answer) (D) By losing, gaining, or sharing electrons between other atoms.