FILE is of type…….
a) int type
b) char * type
c) struct type
d) None of the mentioned
Explanation: It is what is typically termed an opaque data type, meaning it's typically declared as a simple structure, and then internally in the OS libraries the FILE pointer is cast to the actual date-type of the data-structure that the OS will use access data from a file. A lot of these details are system-specific though, so depending on the OS, the definition may differ.
A data of the file is stored in………
a) Ram
b) Hard disk
c) Rom
d) None of these
fseek() should be preferred over rewind() mainly because
a) rewind() doesn't work for empty files
b) rewind() may fail for large files
c) In rewind, there is no way to check if the operations completed successfully
d) All of the above
Explanation: The rewind function sets the file position indicator for the stream pointed to by stream to the beginning of the file.
FILE reserved word is……….
a) A structure tag declared in stdio.h
b) One of the basic datatypes in c
c) Pointer to the structure defined in stdio.h
d) It is a type name defined in stdio.h
For binary files, a ___ must be appended to the mode string.
a) "b"
b) "B"
c) "binary"
d) "01"
What is the function of the mode ‘ w+’?
a) create text file for writing, discard previous contents if any
b) create text file for update, discard previous contents if any
c) create text file for writing, do not discard previous contents if any
d) create text file for update, do not discard previous contents if any
Explanation: w+ is a mode used to open a text file for update (i. e., writing and reading), discard previous contents if any.