UNIT – 10
FILE HANDING IN C
1) _____ provide a way to pass a set of arguments into a program at run time.
a)*command line arguments b)variables c) pointer d) None
2) _______ function is used to open a file .
a)fileopen() b)*fopen() c)open() d)None
3) _______ function is used to close the opened file.
a)fileclose() b)*fclose() c)close() d)None
4) fopen() returns a ______ on success.
a)*file pointer b)NULL c)blank line d)None
5) _____ is used to flush any buffered data out of an output.
a)*fflush() b)free() c)delete() d)None
6) fclose() returns _____ on success .
a)*zero b)null c)blank d) None
7) _____ statement is written to a file .
a) *fprintf() b)fscanf() c) filewrite() d) None
8) fprintf() returns the ______ if successful.
a)null b)zero c)*number of characters d) None
9) Data is read from file by using _______.
a)fprintf() b) *fscanf() c)read() d)None
10) _____ function returns the next character in the input stream.
a)fprintf() b)fscanf() c)*fgetc() d)None
11) _____ function read a string to the stream.
a)*fgets() b)fputs() c)fputc() d)None
12) _____ function writes a string to the stream.
a)fgets() b)*fputs() c)fputc() d)None
13) _______ function to write a single character to the output stream.
a)*fputc() b)fgetc() c)fputs() d)None
14) C communicates with files using a new datatype called _____.
a)file address b)*file pointer c)file array d)None
15) The file mode ____ is used for reading .
a)w b)*r c) a d) None
16) The file mode ____ is used for writing.
a)*w b)r c) a d)None
17) The file mode ____ is used for append any previous contents.
a) w b) r c) *a d) None
18) The ______ function can be used to disconnect a file pointer.
a)fopen() b)fdelete() c)*fclose() d) None
19) NULL is commonly written as _____
a)EOF b)*‘\0’ c)Blank d)None
20) ______ is a character which indicates the end of a file.
a)*EOF b) ‘\0’ c)Blank d)None
UNIT – 10
FILE HANDING IN C
1 A 2 B 3 B 4 A 5 A
6 A 7 A 8 C 9 B 10 C
11 A 12 B 13 A 14 B 15 B
17 C 18 C 19 B 20 A