Question: Write a program that: Opens a file for writing to named exactly Ch 7 pt 1 P 1 . txt . Asks the
Write a program that:
Opens a file for writing to named exactly ChptPtxt
Asks the user to enter a string of characters
Stores the string of characters in the above file
Closes the file
Opens the file again to read from it
Reads the string of characters in the file
Prints the string on the screen
Closes the file
Sample execution:
Enter a string of characters: Today is a great day!
The file contains the text Today is a great day!
There will be no standard output on the screen for this program. But, when you complete the program, you can click on the "Files" button to the left of the "Run" button to make sure that your ChptPtxt file is there. When you are finished, click on the "Submit for Grading" button to turn it in I will grade it manually.
Make sure that you follow the documentation guidelines, etc.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
