单项选择题

Flying foxes have fights ().

A.to occupy the best resting places
B.only when it is dark
C.to protect their homes from outsiders
D.when there is not enough food