Answer:
HCl is reduced and is the oxidizing agent
Step-by-step explanation:
Looking at the reaction shown in the question
Mg(s) + 2HCl(aq) → MgCl2(aq) + H2(g)
HCl is reduced to H2. The oxidation number of hydrogen decreased from +1 to zero. While magnesium was oxidized. Its oxidation number increased from zero to +2.
Hence we can rightly say that HCl was the oxidizing agent since the oxidizing agent is reduced in a reaction and the reducing agent is oxidized in a reaction.