Which function do the stomata perform in photosynthesis?

Producing glucose
Absorbing water
Gas exchange
Capturing light energy

The stomata perform gas exchange during photosynthesis.