Question: need help with these questions in c if answer all questions will give thumbs up THIS QUESTION HAS 2 PARTS: 1. A main function with
THIS QUESTION HAS 2 PARTS: 1. A main function with the function calls to FillPetArray, FindPet, and UpdatePet. Declare any variables and assign values as needed 2. The function definitions (Declare any variables and assign values as needed) FillPetArray that takes one argument, an array of pets, and returns an integer. The function will ask and get how many pets to add to the array and fill the array with the number of pets entered by the user. (Fill the fhelds one by one, do not forget to prompt) The function will return the number of pets back to the main function FindPet that takes two arguments, an array of pets and the number of filled cells in the array. The function prompts the user for the petID of the pet that is to be updated. The function will return the index (location) of pet that matches the id entered by the user(you can assume the user knows the ids and will enter a legitimate id) UpdatePet that takes two arguments, an array of pets and the indexlocationl of the pet that is to be updated. The function prompts the user for fheld that is to be updatedlage or breed). After getting this decision from the user (0 or 1), the correct field (age(0) or breed 1) at the correct indexllocation) will then be updated The structure defined here should be used for this question: #defne SIZE 30 typedef struct int petiD; int age char petBreed SIZE) lpet: Function prototypes for the following functions: FillPetArray, FindPet, and UpdatePet int FillPetArrayl pet list D int FindPett pet list[ 1, int count) void UpdatePetl pet list [ 1. int location) MacBook Air s1u
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
