The correct option is D Mg
Magnesium is higly a reactive metal and is often used as sacrificial metals. It will replace the metal on which it is coated or can react with the atmospheric oxygen and get converted into oxides. Hence it will not serve the purpose of protecting the metal from corrosion.