In order to predict the outcome of an electrolysis experiment, you need to know the reactivity series, and in particular the position of hydrogen in the series: