The function of bacterial endospores is:

A. Reproduction and growth.
B. To provide a protected site for photosynthesis.
C. Protection of genetic material during harsh conditions.
D. Storage of excess cellular building blocks.