Here's a problem to solve: What does photosynthesis produce?

Among the 4 following options, which is the correct answer?

- A: carbon dioxide and nitrogen
 
- B: sugar and carbon dioxide
 
- C: oxygen and nitrogen
 
- D: sugar and oxygen
 