Which function do the stomata perform in photosynthesis?

producing glucose
capturing light energy
gas exchange
absorbing water

Gas exchange