Answer:
According to Lamarck, the giraffe got its long neck because its ancestors stretched theirs to eat leaves that were just out of reach. This stretching of the neck was passed on to their offspring, over generations, until it reached its current length.