The correct option is C Nitric acid
Magnesium on reaction with hydrochloric acid and sulphuric acid will give magnesium chloride and magnesium sulphate respectively. Sodium nitrate is a neutral salt and not an acid. So, ''A'' is nitric acid. The reaction will take place as follows:
HNO3(aq)+Mg(s)→MgNO3(aq)+H2O(l)