Photosynthesis is the most important producer of molecular oxygen (O2) on our planet. From which molecule do oxygen atoms liberated by photosynthesis come? From which other molecule could one suspect they have come? What are the destinations of those oxygen atoms?
The oxygen atoms liberated as molecular oxygen by the photosynthesis process come from water. One indeed could suspect that those oxygen atoms would have come from carbon dioxide. Oxygen atoms from carbon dioxide however are incorporated into glucose molecules and into water molecules liberated in the chemical stage of photosynthesis.