Question: code in C programming (file name is routes-data.csv) 1. Use the function sscanf() to obtain the arguments from the command line using the char *argv[]
code in C programming (file name is routes-data.csv)
1. Use the function sscanf() to obtain the arguments from the command line using the char *argv[] parameter of your main function.
2. Use functions fopen() and fgets() together with for or while loops to read line by line the file passed as an argument to route_manager.
3. Once your program can read all the lines from the input .csv file, you will need to process each line to obtain relevant data to produce the required output. (You can use the function strtok() to obtain data from the fields from each route.)
4. Use the fopen() function and format specifiers to generate the required output in a textbased file called output.txt.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
