For this program you will use C system calls (or C++) to develop a program Creat
ID: 3682875 • Letter: F
Question
For this program you will use C system calls (or C++) to develop a program
Create a program that will duplicate a named file. You should be able to copy any kind of file, regardless of the type of information it contains. You have several options to choose from in implementing your program:
1. Use a command line argument or prompt for the filename to copy
2. Create a name for the copied file by appending “_copy” to create the name of the copied file, using a command line argument, or prompting for the name of the duplicate
Explanation / Answer
include #include using namespace std; int main() { ifstream fin; fin.open("data.txt",ios::in); ofstream fout; fout.open("data_copy.txt",ios::out); char ch; char line[75]; int i = 1; while(fin.get(ch)){ fin.get(line,75,'.'); foutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.