C File Management-2
1. A mode which is used to open an existing file for both reading and writing ______
a) ”W”
b) ”W+”
c) ”R+”
d) ”A+”
Answer: C
R+ mode is used to open an existing fiel for both reading and writing.
2. Select a function which is used to write a string to a file ______
a) pits()
b) putc()
c) fputs()
d) fgets()
Answer: C
fputs() is used to write a string to a file.
3. Select a function which is used to read a single character from a file at a time?
a) fscanf()
b) getch()
c) fgetc()
d) fgets()
Answer: C
fgetc() function is used to read a single character from a file at a time.
4. Select a function which is used as a formatted output file function ______
a) printf()
b) fprintf()
c) puts()
d) fputs()
Answer: B
No explanation is given for this question.
5. Select a program which get input data from datafile and also send output into datafile ,it is called _____
a) files
b) file processing
c) data files
d) file handling
Answer: D
No explanation is given for this question.
6. Select text file in which data is stored in ________
a) ASCII code
b) Binary code
c) Octal code
d) text code
Answer: A
No explanation is given for this question.
7. Select text file in which number will take
a) 2 bytes
b) 4 bytes
c) 3 bytes
d) 8 bytes
Answer: B
No explanation is given for this question.
8. Select which is true about a stream _______
a) It is a general name given to a flow of data
b) It is simply a sequence of bytes
c) It is a logical interface to the data file
d) All of these
Answer: D
No explanation is given for this question.
9. Select in which of the following the character conversion is possible ______
a) text stream
b) binary stream
c) output stream
d) input stream
Answer: A
No explanation is given for this question.
10. Select which is used for the next line marker _______
a) ’\r’
b) ’\n’
c) ’\r’
d) ’\0’
Answer: B
No explanation is given for this question.