Given an input file( named inputFile.txt) with a list of students in the followi
ID: 3547589 • Letter: G
Question
Given an input file( named inputFile.txt) with a list of students in the following format:
Name: John Milton
Major: EE
GPA: 3.98
Name: Karl Lewis
Major: CS
GPA: 3.6
Name: Homer Simpson
Major: CE
GPA: 4.0
.
.
.
A) Write a program to read and display the file content in the following format:
Name: Major: GPA:
John Milton EE 3.98
Karl Lewis CS 3.6
Homer Simpson CE 4.0
...
B) Count the number of record in the file( A record consist of student name, major and GPA)
C) Write in a file, following the format of the table displayed on A) into a new file named outputFile.txt
D) Optional: Compute the average GPA
E) Optional: Count the number of students from each major
Explanation / Answer
http://www.peoi.org/Courses/Coursesen/cprog/frame8.html see the array of structures part u wiill understand every thing needded above any doubts please ask me :)
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.