Question: this is the text file c programming and only use functions given 1. Below you are given some code that will read in student data

 this is the text file c programming and only use functions

given 1. Below you are given some code that will read in

this is the text file

student data from the ice9.txt file. Your task is to add a

c programming and only use functions given

1. Below you are given some code that will read in student data from the ice9.txt file. Your task is to add a loop at the end that will call print_student for every student. You must also complet eprint student so that it prints out the name and the major. The major must be printed as a string not a number. #include # include #include typedef enum (EE, CMPE, CSE, BME) major type; struct student ( char * name ; major type major; void print student (struct student sp) int main (int argc, char "argv) if (argc != 2 ) filename ", argv[O); printf ("%s exit (0) FILE *fp # fopen (argv EU, "r"); pezror ("Could not open file) exit(0): int num students char strr11] int major: struct student "me calloc (10, sizeof (struct stdentt)

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!