Question: Make a program that reads and analyzes step data from a file. The program reads ten the first line of the file, parses the number
Make a program that reads and analyzes step data from a file. The program reads ten the first line of the file, parses the number of steps in the list, and counts the number of steps summation. The program consists of a main program, a file manager and a header file. The main program file contains only the main program, which calls the file processing subroutines. The file handling module (files io.c and io.h) contains the following functions: int read_steps_list (int *, int); void print_list (int *, int); the read_steps_list subroutine accepts the cursor list and list size as parameters. The subroutine reads the number of steps from the file "askeldata.txt" line by line and saves them in a list. Finally, the subroutine returns the sum of the steps. the print_list subroutine receives pointer list and list size and prints the list. Finally, make the main program program.c, which calls yo. function producing the following example run.
Step analysis List steps: 5704 17054 3532 25922 2209 1148 7814 15629 14 6831 Total steps: 85857
The text file looks like this
19.2.2019:5004 20.2.2019:12054 21.2.2019:3000 22.2.2019:24002 23.2.2019:2020 24.2.2019:11548 25.2.2019:7824 26.2.2019:15829 27.2.2019:14882 28.2.2019:6831
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
