Saturday 18 December 2010

Flow chart for To reverse the first n characters in afile

Description:

This program perform the reverse operation of n characters in the file


Output:


source.c
this is source ouput.c

Command line arguments source.c    ouput.c

source.c
this is source text
output.c
this is source text

Command line arguments source.c
Invalid number of arguments.

Conclusion: the program is error free


VIVA QUESTIONS:


1) List out the file handling functions ?
Ans: fopen(), fprintf(),fclose(),fscanf(),fgetc(),fputc(), etc..,

2) What is the use of fseek() function ?
Ans: The function fseek sets the file pointer associated with a stream to a new position

3) What is use of the fflush() function ?
Ans: If the given stream has a buffered output, fflush writes the output of the stream to the associate file.

Algorithm
Files

No comments:

Post a Comment