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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started