During the process of photosynthesis, cells use carbon dioxide and energy from the Sun to make sugar molecules and oxygen.
Then Respiration processes, cells use oxygen and glucose to synthesize energy-rich carrier molecules, such as ATP, and carbon dioxide is produced as a waste product.