How do stomata function in most plants relative to gas exchange?

a
Stomata close to prevent nitrogen from escaping.
b
Stomata close to allow photosynthesis to occur.
c
Stomata open too allow carbon dioxide in and oxygen and water out.
d
Stomata open to allow water to build up in the plant.