Saturday 18 December 2010

Flow chart for Program which copies one file to another

Description:


In this program we have to use the file functions to perform the copy operation from one file to another file.



Output:


source.c 
this is source text 
ouput.c

Command line arguments source.c    ouput.c
Source.c
this is source text ouput.c
this is source text

Command line arguments source.c
Invalid number of arguments.

Conclusion: the program is error free


VIVA QUESTIONS:

1) What is file ?
Ans: The collection of alphabets is called file

2) What are the various operations performed on the file ? Ans: fopen(), fread(), fwrite(), fclose() etc.., 

3) What is the use of file pointer ? 
Ans: The file pointer must be used in subsequent operations on the file


Files

No comments:

Post a Comment