The data containing all the measurement is stored in the file. The size of the file, as well as the number of records, is unknown. Particular entries are separated with a semicolon. Write the function, that takes as the argument the name of the file, and reads its contents into the array of loTmeasurement. The function should return the array of loTmeasurement. Dynamic memory allocation is appreciated. The example of the file is (however the file can be a lot longer): loTmeas001;apple;51.234;19.234;34.65;23.54 loTmeas004;pear;51.211;19.413;33.45;22.41 loTmeas003;orange;51.123;19.164;25.76;22.37 loTmeas001;cherry;51.442;19.334;32.57;12.46

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter7: File Handling And Applications
Section: Chapter Questions
Problem 15RQ
icon
Related questions
Question

In C language

The data containing all the measurement is stored in the file. The
size of the file, as well as the number of records, is unknown.
Particular entries are separated with a semicolon. Write the
function, that takes as the argument the name of the file, and reads
its contents into the array of loTmeasurement. The function should
return the array of loTmeasurement. Dynamic memory allocation is
appreciated.
The example of the file is (however the file can be a lot longer):
loTmeas001;apple;51.234;19.234;34.65;23.54
loTmeas004;pear;51.211;19.413;33.45;22.41
loTmeas003;orange;51.123;19.164;25.76;22.37
loTmeas001;cherry;51.442;19.334;32.57;12.46
Transcribed Image Text:The data containing all the measurement is stored in the file. The size of the file, as well as the number of records, is unknown. Particular entries are separated with a semicolon. Write the function, that takes as the argument the name of the file, and reads its contents into the array of loTmeasurement. The function should return the array of loTmeasurement. Dynamic memory allocation is appreciated. The example of the file is (however the file can be a lot longer): loTmeas001;apple;51.234;19.234;34.65;23.54 loTmeas004;pear;51.211;19.413;33.45;22.41 loTmeas003;orange;51.123;19.164;25.76;22.37 loTmeas001;cherry;51.442;19.334;32.57;12.46
Expert Solution
steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
File Input and Output Operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning