Question: C language Need help. You are a band manager trying to get all your members to a specific city to practice. Unfortunately, due to the

C language Need help.

 C language Need help. You are a band manager trying to

get all your members to a specific city to practice. Unfortunately, due

You are a band manager trying to get all your members to a specific city to practice. Unfortunately, due to the Covid-19 pandemic, if some members of your band test positive for Covid-19 they will not be able to go to practice. Yesterday, the doctor sent you a list of all the band members and their current status (in a textfile). Given the following main, create the two functions used below. The first should read the doctor's list and save the information. It should return 0 if the file doesn't open and 1 if it does. The program should then output a list of all the positive patients and a list of all the negative patients (in two separate files). One single function should output both files (see main below)-note that it should print to screen all information (see sample run) but should only output to file specifically what the second argument states (Positive or Negative-see main and sample output files). DO NOT MODIFY MAIN-O points if you do this. int main (int arge, char** argv) { char band_names[SIZE][20]; char band_diagnose[SIZE]; int n=read_doctor_list("doctorlist.txt","r",band_names,band_diagnose); /*input file, mode to read file, names of band members, diagnosis as letters (for example, Positive should be saved as just 'P')*/ if(n) { band_practice_list("output_p.txt","Positive", band_names,band_diagnose); /*output file, which diagnosis to list (Positive in this case), names of band members, diagnosis as letters (for example, Positive should be saved as just 'P')*/ band_practice_list("output_n.txt", "Negative", band_names,band_diagnose); } } output_p.txt ---List of Positive cases:--- --Flea X: + Positive+ --Anthony Kiedis: +Positive+ --Jack Irons: +Positive+ --Cliff Martinez: +Positive+ Sample run: Computers-MacBook Air:C computer$ ./a.out Creating list... /*this is the band practice_list function*/ Flea X: P...Can't go to practice! :( doctorlist.txt Flea X Positive Anthony Kiedis Positive Chad Smith Negative John Frusciante Negative Jack Irons Positive Cliff Martinez Positive Arik Marshall Negative output n.txt --- List of Negative cases--- -- Chad Smith: -Neg- -- John Frusciante: -Neg- -- Arik Marshall: -Neg- Anthony Kiedis: P... Can't go to practice! :( Chad Smith: N... Good to go to practice! :) John Frusciante: N... Good to go to practice! :) Jack Irons: P... Can't go to practice! :( Cliff Martinez: P... Can't go to practice! :( Arik Marshall: N...Good to go to practice! :) /*Mathis should print out twice since the same function is called twice*/

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!