We know, molecular mass of sucrose is 342 g/mol.
So, number of moles in 18 g is :

Also, number of moles of water is :

We know, 1 mole of sucrose contain 11 moles of oxygen.
So,

1 mole of water contain 1 mole of oxygen .
So, moles of oxygen in water are :

Total number of moles,
.
Number of oxygen atoms are :

Hence, this is the required solution.