#include #include void main() { struct solarsystem { char planet[8]; double population; }; struct solarsystem planets[9] = { "Mercury", 0, "Venus", 0, "Earth", 5.5E9, "Mars", 0, "Jupiter", 0, "Saturn", 0, "Uranus", 0, "Neptune", 0, "Pluto", 0 }; struct solarsystem temp; int x; puts("Solar System Data"); for(x=0;x<9;x++) printf("Planet %i: %s, Population: %.0f\n",\ x+1, planets[x].planet, planets[x].population); puts("\nAfter we swap with Jupiter:"); /* Copy Jupiter's data to temp */ strcpy(temp.planet,planets[4].planet); temp.population = planets[4].population; /* Copy Earth to Jupiter */ strcpy(planets[4].planet,planets[2].planet); planets[4].population = planets[2].population; /* Copy temp to Earth */ strcpy(planets[2].planet,temp.planet); planets[2].population=temp.population; for(x=0;x<9;x++) printf("Planet %i: %s, Population: %.0f\n",\ x+1, planets[x].planet, planets[x].population); }