Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

need help with these questions in c
if answer all questions will give thumbs up
image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Business Process Driven Database Design With Oracle PL SQL

Authors: Rajeev Kaula

1st Edition

1795532386, 978-1795532389

More Books

Students also viewed these Databases questions