Question: have to write a program based on this QUESTION 6 10 p Write a program that reads the name of fruits and the colors from

 have to write a program based on this QUESTION 6 10

have to write a program based on this

QUESTION 6 10 p Write a program that reads the name of fruits and the colors from an input file with the name fruit tbt. Each fruit name and the color is given on a line as shown below separated by space Add checks for the file if required The program has to be general to read in from each line of the file, the name of the fruit and the color, from as many lines and print "Color of the is " output to an output file (fruit2 txt) as shown below. Please do not go with these three fruits and colors as an example. We dont know how many lines are there in the file For example if the file fruit.txt contains Apple Red Orange Orange Grape Green Now fruit2 txt contains Color of Apple is Red Color of Orange is Orange Color of Grape is Green 3 (12pt) '-,-. T./,e ' TTI ? Paragraph ? Arial

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!