![]() |
| Home | IGNOU Papers | IGNOU Assignments | IGNOU Students Forum | IGNOU Articles | Indian Education | Registration | Login |
|
IGNOU > IGNOU Assignments > BCA > BCA 2007 Assignments >C++ and Object Oriented Programming IGNOU BCA Assignments Question 1: 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 > 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) Ans: The following example demonstrates those concepts. This is program which copies the data from one file and copies it to another the program receiving the @ names of the files as command file arguments # include <Fstream.h> |
|||||||||||||||||||
HOME | ABOUT US | GUEST BOOK | TERMS OF SERVICE | PRIVACY POLICY | CONTACT US © 2003-2012, IGNOUGuess.com Website Designing, Website Development, Search Engine Promotion, Web Hosting By: DreamzSop Advertising Private Limited. |
||