Question: C++. There are 4 small question 1/ Write a program called copy that copies the contents of one file to another by reading and writing

C++. There are 4 small question

1/ Write a program called "copy" that copies the contents of one file to another by reading and writing one character at a time.

2/ Assume that there are some number of words (one word per line) in a file called "words.dat". Write the code to print the words from the file in reverse order.

3/ Write a program to read and print out the lines in a file which is formatted as follows. The first line contains the number of lines remaining in the file. Use this number as a loop counter to read each line (may contain more than one word) and print the remaining lines to the screen.

4/ Write a program to read a file word-by-word ("input.dat") and write it to another file ("output.dat") after having made each word lower-case.

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!