Chemical compounds in which anions and cations are held together by electrostatic force of attraction are known as ionic compounds. Cations and anions are charged species which are formed by losing and gaining electron(s) respectively to attain the nearest noble gas configuration or stability. Usually metals lose their valence electrons to form cations while non-metals accept electrons and form anions. Being held by a strong electrostatic force of attraction between ions, ionic compounds have high melting and boiling points.
(iv) The electronic configuration of elements Q and R as follows:
Q: 2, 8, 2
R: 2, 8, 7
Which of the following correctly represents the formula of ionic compound formed by combination of Q and R?