Question: Code in C only, only use basic cs1050 coding because the compiler is very strick. Dont use anything fancy, plain and simple, also make sure
Directions: Complete the following lab assignment using the description given in each section. Purpose: 1. Use command line arguments to do the assignment. 2. Use pointers and pointer notationarithmetic in implementation only. 3. Use functions from relevant libraries for the lab. Description The lab 11 is on malloc, command line and file processing. Download theinputi.txt and input2.txt from blackboard. Implement the following functions for the lab assignment. int loadNumbers (char int ,in): This function takes the input file name, the integer pointer to the array and the count of numbers. It opens the input file, if unable to open it returns 0 otherwise it loads the numbers from the file to the integer pointer and returns 1 at the end. void printNumbersoint ,int): This function prints the content of the array on to the screen, takes in the integer pointer and the size of the array float findAverage(int int): Takes in the integer pointer and find the average of all the numbers and returns it. int findMax(int ,int): Takes in the integer pointer and the size and finds the maximum number in the array. int findMin(int int): Takes in the integer pointer and the size and finds the maximum number in the array. int writeData(char *,int ,int): Takes the output filename, integer pointer denoting the integers, and the size of the array. Open the output file in this function, write all the information which is on the screen also to the output file and return 1 at the end. If unable to open return 0 and exit out of the code. Call this function twice, once for each input file and each set of values. Refer the sample output.txt posted on blackboard. int main0: Use command line arguments to read the file names and the length of records. Call
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
