The correct option is B electrovalent
Mg is a metal and completes its octet by the loss of e−. Oxygen is a non-metal and completes its octet by gain ofe−. So, the formation of MgO involves a transfer of an electron from metal to non-metal. Hence, the bonding is electrovalent.