Your answers would be Natural Selection and Adaptation.
_________________________________________________
Natural Selection is when an organism that is better adapted to a environment would survive longer and produce more offspring. Since there were short and long necked giraffe, when the grass disappeared, the long neck giraffes were better adapted to the environment because their long necks allowed them to eat off of tall tress, while the short neck giraffes died because they couldn't eat. The long neck giraffes survived and produced more babies with long necks.
_________________________________________________
Adaptation is when an organism adapts to an environment. In this case, the giraffes had to adapt to the environment by eating off of tall trees since all of the grass on the ground has disappeared. Because of the long neck giraffes adapting to their new environment (eating off of tall tress) they survived longer and had many generations of long neck giraffes.