The correct option is A 1s2 2s2 2p6
Atomic number of magnesium is 12. Magnesium atom loses 2 electrons from its outermost shell to form Mg2+ ion. Hence, Mg2+ ion has total 10 electrons.
The electrons are filled in the orbitals according to the Aufbau principle. It states that filling of electrons takes place in increasing order of energy.
The energy increases with increasing value of n + l.
Orbital1s2s2p(n+l)value123
Since, 10 electrons are present in magnesium ion, the electronic configuration is given by-
1s2 2s2 2p6.