On burning the magnesium in air the products formed are magnesium oxide and magnesium nitride. Now, on hydrolysis of magnesium nitride the products come out to be ammonia and magnesium hydroxide. Thus, by Ostwald's process the compound D is NH3 and compound C is Mg(OH)2 The corresponding reactions are shown below: 2Mg(s)+O2(g)