File handling in C MCQ’s

1.  A data of the file is stored in …

a) Ram

b) Hard disk

c) Rom

d) None

Answer - Click Here:
b

2. A mode which is used to open an existing file for both reading and writing …

a)”W”

b)”W+”

c)”R+”

d)”A+”

Answer - Click Here:
c

3. Select a function which is used to write a string to a file…

a)pits()

b)putc()

c)fputs()

d)fgets()

Answer - Click Here:
c

4. 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 - Click Here:
c

5. Select a function which is used as a formatted output file function…

a)printf()

b)fprintf()

c)puts()

d)fputs()

Answer - Click Here:
b

6. 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 - Click Here:
d

 

7. Select text file in which data is stored in….

a)ASC11 code

b)Binary code

c)Octal code

d)text code

Answer - Click Here:
a

 

8. Select text file in which number  will take.

a)2 bytes

b)4 bytes

c)3 bytes

d)8bytes

Answer - Click Here:
b

9. 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 - Click Here:
d

10. select in which of the following the character conversion is possible….

a)text stream

b)binary stream

c)output stream

d)input stream

Answer - Click Here:
a

11. Select which is  used for the next line marker….

a)’\r’

b)’\n’

c)’\r’

d)’\0’

Answer - Click Here:
b

12. which Is data type of file pointer is….

a)int

b)double

c)void

d)File

Answer - Click Here:
d

Subscribe for Friendship

Prof. Fazal Rehman Shamil
Latest posts by Prof. Fazal Rehman Shamil (see all)

    Buy advertisement space on T4Tutorials

    For more details email [email protected]