Mg(s)+Cu2+(0.01M)→Mg2+(0.001M)+Cu(s)
∴Q=[Mg2+]×[Cu][Cu2+]×[Mg]=0.001×10.01×1=0.1
using Nerst equation
Ecell=E0cell−0.0591nlogQ
=2.71−0.05912log0.1
=2.74V
(i) In the first case voltage applied is less than 2.71 V so current will be from from cathode to anode
(ii) In the second case voltage applied is more than 2.71 V so current will be from from anode to cathode