This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: You will also have to use conditional statements to check for the ends of files. 3. Now add the following content to your existing textfile: a) I Love 6.096 too! b) Several more lines added by the user (inputting should continue as long as the user wishes – ask the user after every line he/she inputs!) 4. Finally, count and print: a) The number of occurrences of the letter ‘O’ in your file File 3.txt. b) The number of occurrences of the word “Love” in your file File3.txt (You can use the strcmp() function of file cstring here, or compare using string objects, with which you can use the == operator)...
View Full Document
- Spring '11
- following content, Textfile FILE3.TXT