What was the purpose of the pyramids?

a: to hold rebels as prisoners
b: to house farmers and their families
c: to store grain and dried beans
d: to serve as tombs for pharaohs