Which of the following could be considered a reason for the construction of the Egyptian pyramids?

Ato serve as a means of defense from neighboring kingdoms
Bto serve as a way to catch and hold rainwater
Cto serve as scouting locations for the Egyptian military
Dto serve as royal tombs for pharaohs