diff --git a/inherit/main.c b/inherit/main.c index 9fce1aa..2b3fd13 100644 --- a/inherit/main.c +++ b/inherit/main.c @@ -22,11 +22,17 @@ int main () myCar.vehicle.magic = 9; strcpy(myCar.brand, "Dodge"); - printf("The car's life is: %d\n" "The car's magic is: %d\n" - "The car's brand is: %s\n", myCar.vehicle.life, myCar.vehicle.magic, + printf("My car's life is: %d\n" "My car's magic is: %d\n" + "My car's brand is: %s\n\n", myCar.vehicle.life, myCar.vehicle.magic, myCar.brand); + Car herCar; + herCar.vehicle.life = 8; + herCar.vehicle.magic = 5; + strcpy(herCar.brand, "Saturn"); - + printf("Her car's life is: %d\n" "Her car's magic is: %d\n" + "Her car's brand is: %s\n", herCar.vehicle.life, herCar.vehicle.magic, + herCar.brand);