Giraffes evolved over many generations to have long necks. Giraffes that had longer necks were more likely to survive than giraffes with shorter necks because they had better access to food. This is an example of .