Write a program that emulates the DOS COPY command i.e., it should copy the contents of a character file (such as any CPP file) to another file. Invoke the program with two command line arguments – the source file and the destination file – like this
C%26gt;ocopy srcfile.ext destfile.ext
In the program check that user has typed the correct number of command line arguments, and that the file specified can be opened. Improve on the DOS TYPE command by having the program signal an error if destination file already exist. This will prevent inadvertently writing over a valuable file (Hint: Use no replace flag)
Write a program that emulates the DOS COPY command i.e., it should copy the contents of a character file (such
Sounds like a homework question, right out of a textbook.
What program language is supposed to be used?
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment