All of the answers are correct. The gravitational pull between the planets and the Sun, as well as the gravitational pull between the planets themselves, keeps them from floating away into space. Additionally, the Earth's gravitational pull and the moon's gravitational pull also contribute to keeping the planets in their respective orbits.