Part 1 20 Pts Due Week 4 7 2019 Modify Pet Struct Program Last Week S Pre Lab Struct Dynam Q37046405

Part 1 (20 pts.) Due the week of: 4/7/2019

Modify your pet struct program from last week’s pre-lab so thestruct is dynamically allocated.

The struct type pet from the last pre-lab was defined asfollows:

struct pet { char breed[20]; char name[20]; char color[20]; intnum_legs; };

The modification you will be making is asking the user during runtime how many pets they would like to enter. The user will theninput the information for each pet, including the pet’s breed,name, color, and number of legs. Once the data for each pet hasbeen entered, print the information for each pet back to theterminal.

This is like an array

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.