Question: Here is the (A3b-largegrades.txt) text file( Please use the name of the text file in the program ): Here is the (A3b-smallgrades.txt) text file( Please

 Here is the (A3b-largegrades.txt) text file( Please use the name of

Here is the (A3b-largegrades.txt) text file( Please use the name of the text file in the program ):

the text file in the program ): Here is the (A3b-smallgrades.txt) text

Here is the (A3b-smallgrades.txt) text file( Please use the name of the text file in the program ):

file( Please use the name of the text file in the program Here is my program from assignment A3a:

#include #include #include // function declarations void getStudents(char* names[], int noOfStuds); void getGrades(int** grade, int noOfStuds, int noOfTests); void calcGrades(char gradeletter[], int** grade, int noOfStuds, int noOfTests); void printStudents(char* names[], int noOfStuds); void printGrades(int** grade, int noOfStuds, int noOfTests); void printFinalGrades(char gradeletter[], int noOfStuds); int main() { char buff[BUFSIZ]; // declaring variables int noOfStuds, noOfTests, i; // getting the inputs entered by the user printf("How many students :"); scanf("%d", &noOfStuds); printf("How many assignments :"); scanf("%d", &noOfTests); // creating two dimensional array which stores grades int* grade[noOfStuds]; for (i = 0; i = 90) { gradeletter[i] = 'A'; } else if (avg >= 80 && avg = 70 && avg = 60 && avg = 0 && avg This program is a modification of your program for A3a. Instead of accepting input from user through standard input, you will be taking input from a file. You must take the input file name on the command line Be sure to have simple error checking to be sure the file exists and was successfully opened The input file will have the following format: First 1ine: Number of students Second Line: Number of assignments Third Line: Student Names, space delimited Fourth+ Line(s): Grades for all students for one assignment, space delimited Example of input file format: 2 Joel Sophie 100 97 78 92 62 70 Requirements: - Your program must read input from a file in the proper format, NOT stdin - Your program should accept the filename from the commandline as shown in the example below Your program should be able to handle a file of any reasonable size. (I will not use excessively long student names, but there may be MANY students and grades.) Do not just make your arrays really large, you need to dynamically allocate them Example: $ ./a.out infile.txt Joel 100 Sophie 97 92 70

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!