like a molecule of sugar contain c6 h12 o6
It depends on the type of sugar. Different sugars have different formulae and sometimes different sugars have the same formulae. However, because you gave a specific formula, we should be able to work it out for the formula.
The 24 atoms of your sugar molecule are six carbon, six oxygen and twelve hydrogen. You could say the hydrogen and oxygen are six water molecules. Your two teaspoons of sugar (10 grammes) are now 1/4 carbon and 3/4 water.
As a rough guide using atomic weight (which ignores the negligable weight of electrons), carbon atoms have six nucleons, oxygen eight, and hydrogen one. So carbon is six and water ten. By weight then, 10 grammes of sugar are 3.75g carbon and 6.25g water. You could convert that water into constituent gases but it won't really have a weight then.