Marvellous!

18 g of water is equivalent to 1 mole of water, since the molar mass of water is 18 g/mol.

=
By looking at the formula, in 1 mole of water, there are

  • 2 moles of hydrogen atoms and

  • 1 mole of oxygen atoms.

1 mole represents the quantity of 6.02 x 1023.

So, 2 moles of hydrogen atoms will be equivalent to (6.02 x 1023) x 2
= 12.04 x 1023
= 1.204 x 1024 hydrogen atoms

1 mole of oxygen atoms will be equivalent to
6.02 x 1023 oxygen atoms.