The electronic configurations of Na and Mg are: Na:1s2 2s2 2p6 3s1 And Mg: 1s2 2s2 2p6 3s2 thus, the first electron in both the cases has to be removed...
HCl + HOH --------> Cl- + H3O+
CH3COOH + HOH --------> CH3COO- + H3O+
HCl is strong acid but chloride ion is a weak base similarly CH3COOH is weak acid but CH3COO-...