A program reads data from a text file, splits the data depending on its content and stores the separated data into different files. The text file TheData.txt contains 72 lines of data. Each line of data has an integer number and a string colour that are separated by a comma. For example, the first line in the file is: 10 , red The integer is 10 and the string is "red" The file contains six different colours: red, green, blue, orange, yellow, pink. Each of the six colours has a blank text file where the numbers will be stored. The names of these six text files are: The procedure SplitData() needs amending to call StoreData() six times, with each of the six colour arrays and the name of the text file that corresponds to that colour. For example, StoreData () will be called with the red array and the file name "Red.txt" Write program code to amend SplitData ()
Exam No:9618_s25_qp_41 Year:2025 Question No:2(d)
Answer:


Knowledge points:
20.2 File Processing and Exception Handling
Solution:
Download APP for more features
1. Tons of answers.
2. Smarter Al tools enhance your learning journey.
IOS
Download
Download
Android
Download
Download
Google Play
Download
Download