What is the primary function of photosynthesis in plants?

A. Energy consumption
B. Oxygen consumption
C. Carbon dioxide release
D. Food (glucose) production