Unit_B

Page 1

UNIT-5 Q.1 A __________ is a place on the disk where a group of related data is stored. (a) disk (b) file (c) both (d) none Q.2 Basic operations performed on files is/are__________ (a) opening a file (b) reading data from file (c) closing a file (d) all the above Q.3 getw() is used to__________ (a) read an integer from a file (b) read a string from a file (c) none Q.4 ftell() is used to__________ (a) give the current position of a file (b) give the specified character position (c) none Q.5 fopen() is used to__________ (a) create a new file (b) open an existing file (c) both (d) none Q.6 What does FILE *fp indicate? (a) fp as a pointer to datatype FILE (b) FILE as a pointer to datatype fp (c) none Q.7 The mode r is used to open a file for__________ (a) read only (b) write only (c) none Q.8 The mode a is used to open a file for__________ (a) read (b) adding data (c) none Q.9 The mode w+ is used for__________operations. (a) reading (b) writing (c) both (d) none Q.10 If a non-existing file is opened in read mode then__________occurs. (a) Error (b) new file is created (c) none Q.11 Standard i/o routines are __________ (a) fopen() (b) getw() (c) rewind() (d) all of these Q.12 When end of file is reached getc() returns__________ (a) -1 (b) EOF (c) both


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.