Electrolysis is the process in which water is decomposed to H2O and O2 due to an electric current being passed through it.
how it is done :
an electric power source is connected to two electrodes(made of inert material like Pt,stainless steel or iridium). hydrogen will appear at cathode an oxygen will appear at anode.  

pls give it as best ans if u think the ans to be correct
Upon Electrolysis Water decompes to form Oxygen & Hydrogen Gas.This type of decomposition reaction is called Electrolytic Decomposition.
Equation: 2H2O(l)→2H2(g)+O2(g)
1 5 1