What is formed at the anode and cathode when the following solutions are electrolysed?

sodium iodide
copper II chloride
sodium sulphate
NaOH
HCl
magnesium nitrate

also is this true: if the metal in the compound is higher in the reactivity series than hydrogen then hydrogen is produced instead of the metal at the positive electrode.