Question: I need a C program that can read a txt file and convert to csv in a rearranged format The data in the txt file

I need a C program that can read a txt file and convert to csv in a rearranged format

The data in the txt file will have this format:

time: 0 ms potentiometer: 0.00 temperature: 0.15 light: 0.00 switch0: 0 switch1: 1 switch2: 1 switch3: 1 --------------------------- time: 20 ms potentiometer: 0.00 temperature: 0.15 light: 0.00 switch0: 1 switch1: 1 switch2: 1 switch3: 1 --------------------------- time: 40 ms potentiometer: 0.00 temperature: 0.15 light: 0.00 switch0: 1 switch1: 1 switch2: 1 switch3: 1 ---------------------------

etc...

Then scan and extract the data I want and form it into columns to export as a csv file. That data will be stored in excel with this format:

Time Potentiometer Temperature Light Switch0 etc...

0 0.00 0.15 0.00 0

20 0.00 0.15 0.00 1

40 0.00 0.15 0.00 1

etc....

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!