Question: write a program in C (NOT C++) that will use a structure for university classes. Make an array of classes. Print out information about the

write a program in C (NOT C++) that will use a structure for university classes. Make an array of classes. Print out information about the classes. please comment your code so i can follow it. thank you. The class structure needs to have: Class name (string), class id (string), credits (integer) Use classes.txt to get the input, but your program will read the strings in from stdin. You will use redirection to get the strings from the file. (./lab7 < classes.txt) The last line in the file will be Xs for each item on the line.

Information to print:

Print each class and its information in the following manner:

Class: ID-HIST102, Name-American History, Credits-3

Class: ID-CSCI112, Name-Intro to C, Credits-4

Print out information about the classes as a whole in the following manner:

Total classes:

Total class credits:

CSCI classes:

CSCI class credits:

classes.txt

CSCI112 Programming with C 3

CSCI127 Joy and Beauty of Data 4

CSCI132 Basic Data Structures and Algorithms 4

CSCI338 Computer Science Theory 3

CSCI215 Social and Ethical Issues in CS 3

ARCH112 Introduction to Design 3

COMX112 Interpersonal Skills in the Workplace 1

HSTA101 American History 4

XXXXXXX XXXXXX X

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!