I was working on a C program command interpreter where I have to deal with fork and other commands.
I wrote the program and also initiated the run command in it.
Now I am not being able to initiate a copy function in it.
So, please help me with this.
I have attached my source file.
If possible, could you make it work?
here is what I need to do?
COPY command takes two additional arguments, the source(file to be copied) and the destination(file to be created).
The syntax is
COPY source destination
Algorithm is:
Open the source file for input
Open the destination file for output
For each character in the source file
Read the character from the source
Write the character to destination
Close the source file
Close the destination file.