Zisha Fernandes has provided absolutely correct answer.
Pure water contains two hydrogen atoms and one oxygen atom. Hydrogen and oxygen respectively combine together in the ratio of 1:8 by mass to form water. The ratio by the number of atoms for water will always be H : O = 2 : 1. Thus, 18 g of water contains 2 g of hydrogen and 16 g of oxygen. This can be expressed in the form of the following equation.
2H2 + O2 → 2H2O
@Zisha, Good effort! Your answers are really helpful to all the users of this community. Keep writing!!!