To read a single character from file which function is used?
a) fputc()
b) fgetc()
c) scanf()
d) fsanf()
To open a file in read only mode which parameter is used?
a) r
b) W
c) a
d) r+
To open a file in write only mode which parameter is used?
a) w+
b) w
c) a
d) r+
To open a file in read and write mode which parameter is used?
a) r
b) w
c) a
d) r+
Which of the following true about FILE *fp
a) FILE is a keyword in C for representing files and fp is a variable of FILE type
b) FILE is a stream
c) FILE is a buffered stream
d) FILE is a structure and fp is a pointer to the structure of FILE type
Explanation: fp is a pointer of FILE type and FILE is a structure that store following information about opened file.
The first and second arguments of fopen() are
a) A character string containing the name of the file & the second argument is the mode
b) A character string containing the name of the user & the second argument is the mode
c) A character string containing file pointer & the second argument is the mode
d) None of the mentioned