Question: This question require the C programming and use file to create file and from file to read and create another coding The tab delimited file

 This question require the C programming and use file to create

This question require the C programming and use file to create file and from file to read and create another coding

The tab delimited file "vehicle.txt" contains the sales information of different types of vehicles (car, MPV, bus and lorry) as follows: (Fail "vehicle.txt" mengandungi maklumat jualan jenis kenderaan yang berbeza (kereta, MPV, bas dan lori). Maklumat di dalam fail tersebut dipisahkan oleh tab adalah seperti berikut:) Car 100 150 Month January February March April May June 125 MPV 75 25 66 35 30 33 Bus 50 45 22 30 15 35 Lorry 25 20 12 25 13 75 80 95 22 (a) Draw the flowchart to read the file, calculate the sum of sales and average of sales for each type of vehicle, and then store it into a file named "sales.txt. (Lukiskan carta alir untuk membaca fail, mengira jumlah jualan dan purata jualan bagi setiap jenis kenderaan, dan kemudian menyimpannya ke dalam fail bernama "sales.txt") (6 Marks / Markah) (b) Write a C program to read the file, calculate the sum of sales and average of sales for each type of vehicle, and then store it into a file named sales.txt. [Tulis satu aturcara untuk membaca fail , mengira jumlah jualan dan purata jualan bagi setiap jenis kenderaan, dan kemudian menyimpannya ke dalam fail bernama "sales.txt".)

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!