GSEB Std 12 Computer MCQ Answers Ch 11 File Handling

Well-structured Std 12 Computer Textbook MCQ Answers and Std 12 Computer MCQ Answers Ch 11 File Handling can serve as a valuable review tool before computer exams.

GSEB Std 12 Computer Chapter 11 MCQ File Handling

Question 1.
Storage devices are categorized into ……………… categories.
(A) two
(B) three
(C) four
(D) five
Answer:
(A) two

Question 2.
Storage devices are categorized into which categories ?
(A) Volatile
(B) Non-volatile
(C) (A) and (B) both
(D) None of these
Answer:
(C) (A) and (B) both

Question 3.
Storage which is temporary is called ……………. .
(A) non-volatile storage
(B) volatile storage
(C) (A) or (B)
(D) none of these
Answer:
(B) volatile storage

Question 4.
Storage which is permanent is called ……………. .
(A) non-volatile storage
(B) volatile storage
(C) (A) or (B)
(D) none of these
Answer:
(A) non-volatile storage

Question 5.
If the computer is shut down and the data is lost then it is called ……………… storage.
(A) non-volatile storage
(B) volatile storage
(C) (A) or (B)
(D) none of these
Answer:
(B) volatile storage

Question 6.
Volatile storage is of ……………… type.
(A) temporary
(B) permanent
(C) sometimes temporary, sometimes permanent
(D) none of these
Answer:
(A) temporary

GSEB Std 12 Computer MCQ Answers Ch 11 File Handling

Question 7.
In ……………. type, the data is lost when the computer shuts down.
(A) non-volatile storage
(B) volatile storage
(C) (A) or (B)
(D) none of these
Answer:
(B) volatile storage

Question 8.
…………….. is true for the volatile storage.
(1) Data is lost when the computer shuts down
(2) Hard disk is the volatile storage.
(3) Volatile storage is temporary.
(4) Data is lost in some few seconds.

(A) 1, 2
(B) 3, 4
(C) 1, 3
(D) 2, 4
Answer:
(C) 1, 3

Question 9.
……………. is used to store values in variables.
(A) ROM
(B) PROM
(C) RAM
(D) PRAM
Answer:
(C) RAM

Question 10.
RAM stands for …………….. .
(A) Random Access Memory
(B) Read Access Memory
(C) Reform Access Memory
(D) Resource Access Memory
Answer:
(A) Random Access Memory

Question 11.
……………. is stored in RAM.
(A) Variable
(B) Object
(C) Reference of objects
(D) All of these
Answer:
(D) All of these

Question 12.
When data is lost in volatile storage ?
(A) When program is closed
(B) WTien computer shuts down
(C) (A) or (B)
(D) None of these
Answer:
(C) (A) or (B)

Question 13.
If the computer is shut down and the data is not lost then it is called …………….. storage.
(A) non-volatile storage
(B) volatile storage
(C) (A) or (B)
(D) none of these
Answer:
(A) non-volatile storage

GSEB Std 12 Computer MCQ Answers Ch 11 File Handling

Question 14.
Volatile storage is of ………………. type.
(A) temporary
(B) permanent
(C) sometimes temporary, sometimes permanent
(D) none of these
Answer:
(B) permanent

Question 15.
In ………………. storage value of variable is not lost even though the computer is not supplied electricity.
(A) non-volatile storage
(B) volatile storage
(C) (A) and (B) both
(D) none of these
Answer:
(A) non-volatile storage

Question 16.
To save the Java program on the disk, ……………… type of storage is used.
(A) temporary
(B) permanent
(C) sometimes temporary, sometimes permanent
(D) none of these
Answer:
(B) permanent

Question 17.
Computer file is the data group stored on ……………….
(A) non-volatile storage
(B) volatile storage
(C) (A) and (B) both
(D) none of these
Answer:
(A) non-volatile storage

Question 18.
Files are stored on ………….. storage.
(A) temporary
(B) permanent
(C) sometimes temporary, sometimes permanent
(D) none of these
Answer:
(B) permanent

Question 19.
Which sentence is true for the non-volatile storage ?
(1) It is a permanent storage.
(2) If the computer shuts down the data is lost
(3) Files are stored on the devices like hard disk, USB drive, optical disk, compact disc etc.
(4) Computer files are never stored on non¬volatile storages.
(A) 1, 2
(B) 3, 4
(C) 1, 3
(D) 2, 4
Answer:
(C) 1, 3

Question 20.
Files can be stored on …………….. .
(A) hard disk
(B) USB drive
(C) optical disk and compact disk
(D) all of these
Answer:
(D) all of these

GSEB Std 12 Computer MCQ Answers Ch 11 File Handling

Question 21.
USB stands for ……………… .
(A) Universal Serial Bus
(B) Universal Source Bus
(C) Universal Secondary Bus
(D) Universal Section Bus
Answer:
(A) Universal Serial Bus

Question 22.
CD stands for ……………….. .
(A) Common Disc
(B) Compare Disc
(C) Compact Disc
(D) Caption Disc
Answer:
(C) Compact Disc

Question 23.
Data stored in the files are called ……………. .
(A) static data
(B) persistent data
(C) dynamic data
(D) rough data
Answer:
(B) persistent data

Question 24.
Files are divided into ……………… types.
(A) two
(B) three
(C) four
(D) five
Answer:
(A) two

Question 25.
Files are divided into ………………. types.
(A) text file
(B) binary file
(C) (A) and (B) both
(D) none of these
Answer:
(C) (A) and (B) both

Question 26.
Files which can be read by text editors are called …………… files.
(A) text
(B) editor
(C) source
(D) binary
Answer:
(A) text

GSEB Std 12 Computer MCQ Answers Ch 11 File Handling

Question 27.
Files can be read by ……………. is called text file.
(A) graphics editor
(B) source editor
(C) sort editor
(D) text editor
Answer:
(D) text editor

Question 28.
……………. holds the data read by text editor.
(A) Text file
(B) Binary file
(C) (A) and (B) both
(D) None of these.
Answer:
(A) Text file

Question 29.
Data of text file is encoded using ………………. .
(A) ASCII
(B) Unicode
(C) (A) or (B)
(D) none of these
Answer:
(C) (A) or (B)

Question 30.
ASCII stands for …………….. .
(A) American Standard Code for Interchange Information
(B) American Standard Code for Information Interchange
(C) American Standard Code for Intelligent Interchange
(D) American Standard Code for Interchange Intelligent
Answer:
(B) American Standard Code for Information Interchange

Question 31.
Unicode stands for …………….. .
(A) Universal trunk – out-of-service CODE
(B) Universal trunk – out-of-source CODE
(C) Universal trunk – out-of-save CODE
(D) Universal trunk – out-of-section CODE
Answer:
(A) Universal trunk – out-of-service CODE

Question 32.
Which file can be a data file ?
(A) Text file
(B) Binary file
(C) (A) and (B) both
(D) None of these
Answer:
(A) Text file

GSEB Std 12 Computer MCQ Answers Ch 11 File Handling

Question 33.
Which information can be there in a data file ?
(A) Names, pay-roll, salary information
(B) Text including program or software instructions
(C) Text including applications
(D) All of these
Answer:
(D) All of these

Question 34.
In ……………, text file can be created.
(A) gedit
(B) vi
(C) pico
(D) all of these
Answer:
(D) all of these

Question 35.
Gedit stands for …………….. .
(A) GNAME Text Editor
(B) GNOME Text Editor
(C) GNOMA Text Editor
(D) GNAMO Text Editor
Answer:
(B) GNOME Text Editor

Question 36.
vi stands for …………….. .
(A) visual editor
(B) voice editor
(C) victory editor
(D) vector editor
Answer:
(A) visual editor

Question 37.
Which is the extension of text file ?
(A) .txt
(B) .java
(C) .c
(D) All of these
Answer:
(D) All of these

Question 38.
File containing data in the binary is called …………….. .
(A) text file
(B) binary file
(C) (A) and (B) both
(D) none of these
Answer:
(B) binary file

Question 39.
Data of binary file is represented in ……………… form.
(A) binary
(B) byte
(C) (A) or (B)
(D) none of these
Answer:
(C) (A) or (B)

GSEB Std 12 Computer MCQ Answers Ch 11 File Handling

Question 40.
Binary file represents the data which is not coded. – Choose the appropriate option.
(A) True
(B) False
(C) Can’t say
(D) None of these.
Answer:
(A) True

Question 41.
Binary file represents the data as ……………. .
(A) text
(B) graphics
(C) (A) and (B) both
(D) binary
Answer:
(D) binary

Question 42.
In binary file data is used in ……………..
(A) byte
(B) text
(C) graphics
(D) none of these
Answer:
(A) byte

Question 43.
………….. can be the extension of binary file.
(A) .jpeg
(B) .mp3
(C) .class
(D) All of these
Answer:
(D) All of these

Question 44.
JPEG stands for ……………. .
(A) Joint Photographic Export Group
(B) Joint Photographic Expert Group
(C) Joint Photographic Exchange Group
(D) Joint Photographic Express Group
Answer:
(B) Joint Photographic Expert Group

Question 45.
mp3 stands for ……………….. .
(A) MPEG-1/MPEG-2 Audio Layer III
(B) MPEG-1/MPEG-2 Audio Launch III
(C) MPEG-1/MPEG-2 Audio Label III
(D) MPEG-1/MPEG-2 Audio Length III
Answer:
(A) MPEG-1/MPEG-2 Audio Layer III

GSEB Std 12 Computer MCQ Answers Ch 11 File Handling

Question 46.
………….. can be processed on using Java Language.
(A) File
(B) Directory
(C) (A) and (B) both
(D) None of these
Answer:
(C) (A) and (B) both

Question 47.
Which type of process can be done on a file using Java program ?
(A) To decide the path of a file or directory
(B) To open the file
(C) To write in a file
(D) All of these
OR
(A) To read from the file
(B) To close the file
(C) To remove a file
(D) All of these
Answer:
(D) All of these

Question 48.
Java can give the facility of ……………. class.
(A) in-built
(B) semi in-built
(C) mid in-built
(D) all of these
Answer:
(A) in-built

Question 49.
In …………. package, the inbuilt facility of class is available.
(A) java.class
(B) java.base
(C) java.io
(D) java.package
Answer:
(C) java.io

Question 50.
Java uses the concept of ………………. .
(A) source
(B) stream
(C) section
(D) standard
Answer:
(B) stream

Question 51.
Java provides the classes for different type of Input/Output (I/O) processes to be done on ………………. .
(A) bytes
(B) characters
(C) (A) and (B) both
(D) none of these
Answer:
(C) (A) and (B) both

GSEB Std 12 Computer MCQ Answers Ch 11 File Handling

Question 52.
I/O stands for …………… .
(A) inline/outline
(B) input/output
(C) in/out
(D) inner/outer
Answer:
(B) input/output

Question 53.
How many classes are provided by Java to process on bytes and characters ?
(A) Two
(B) Three
(C) Four
(D) Five
Answer:
(A) Two

Question 54.
Java provides …………… to process on bytes and characters for input/output.
(A) to read data from file
(B) to write data in a file
(C) (A) and (B) both
(D) none of these
Answer:
(C) (A) and (B) both

Question 55.
Which class includes the characteristics of file or directory ?
(A) java.io.File
(B) java.class.File
(C) java.attributes.File
(D) java.File.Directory
Answer:
(A) java.io.File

Question 56.
To achieve ……………….. file class is used.
(A) file attributes
(B) directory attributes
(C) (A) and (B) both
(D) none of these
Answer:
(C) (A) and (B) both

Question 57.
……………… process can be done on file or directory.
(A) Create
(B) Rename
(C) Delete
(D) All of these
Answer:
(D) All of these

Question 58.
Information of …………………. type can be achieved for the attributes of files.
(A) to use the file
(B) size of a file
(C) time of last modification
(D) all of these
Answer:
(D) all of these

GSEB Std 12 Computer MCQ Answers Ch 11 File Handling

Question 59.
The meaning of creating a file object related to file class is not that ……………. .
(A) the file or directory exists
(B) the file or directory does not exist
(C) (A) and (B) both
(D) none of these.
Answer:
(A) the file or directory exists

Question 60.
How many methods are there to process on file or directory ?
(A) 20
(B) 30
(C) 40
(D) 50
Answer:
(B) 30

Question 61.
For ……………. process file class does not provide any method.
(A) to read from a file
(B) to write in a file
(C) (A) and (B) both
(D) none of these
Answer:
(C) (A) and (B) both

Question 62.
……………… class is available to read or write in a file.
(A) Stream class
(B) Master class
(C) User class
(D) Process class
Answer:
(A) Stream class

Question 63.
Using file class …………………. type of reference can be given for a file.
(A) giving related path
(B) giving absolute path
(C) (A) or (B)
(D) none of these
Answer:
(C) (A) or (B)

Question 64.
To make a file or directory, ……………… constructor is provided by class.
(A) file (string path)
(B) file (string directory_path, string file_name)
(C) file (file directory, string file_name)
(D) all of these
Answer:
(D) all of these

Question 65.
The “passwd” file of ………………… directory of Linux stores the information of user.
(A) /etc
(B) /root
(C) /bin
(D) /home
Answer:
(A) /etc

Question 66.
The ………………. file of /etc directory of Linux stores the information of user.
(A) pass
(B) passwr
(C) passwd
(D) password
Answer:
(C) passwd

GSEB Std 12 Computer MCQ Answers Ch 11 File Handling

Question 67.
To indicate the attributes of the file which – method is used to create Java file object ?
(A) Indicating the path
(B) By indicating the directory and file with different arguments
(C) Giving the reference of directory lying in dirobj object.
(D) All of these
Answer:
(D) All of these

Question 68.
Which method shows the method to create java file object ?
(A) File dirobj = new File (“etc”); File fileobj = new File (dirobj, “passwd”);
(B) File fileobj = new File (“etc”, “passwd”);
(C) File fileobj = new File (“etc/passwd”);
(D) Any of these
Answer:
(C) File fileobj = new File (“etc/passwd”);

Question 69.
Which option shows the method of file class ?
(A) boolean exists(), boolean isFile()
(B) boolean isDirectory(), boolean isHidden()
(C) String getAbsolutePath(), String getName
(D) All of these
OR
(A) String getPath()
(B) long length()
(C) String [ ] list(), File [ ] listFiles[ ]
(D) All of these
Answer:
(D) All of these

Question 70.
Which method of file class returns true or false if the file or directory exists or not ?
(A) boolean isDirectory()
(B) boolean isFile()
(C) boolean exists()
(D) boolean isHidden()
Answer:
(C) boolean exists()

Question 71.
Which value is returned by the method boolean existsO ?
(A) true
(B) false
(C) (A) or (B)
(D) None of these
Answer:
(C) (A) or (B)

Question 72.
Which method returns true if the file exists otherwise returns false ?
(A) boolean isDirectory()
(B) boolean isFile()
(C) boolean exists()
(D) boolean is Hidden()
Answer:
(B) boolean isFile()

Question 73.
boolean isFile() can return ……………… value.
(A) true
(B) false
(C) (A) or (B)
(D) None of these
Answer:
(C) (A) or (B)

GSEB Std 12 Computer MCQ Answers Ch 11 File Handling

Question 74.
Which method returns true if the directory exists otherwise returns false ?
(A) boolean is Directory()
(B) boolean isFile()
(C) boolean exists()
(D) boolean isHidden()
Answer:
(A) boolean is Directory()

Question 75.
boolean isDirectory() can return ……………… value.
(A) true
(B) false
(C) (A) or (B)
(D) None of these
Answer:
(C) (A) or (B)

Question 76.
Which method returns true if the file is hidden ?
(A) boolean isDirectory()
(B) boolean isFile()
(C) boolean exists()
(D) boolean isHidden()
Answer:
(D) boolean isHidden()

Question 77.
boolean isHidden() method returns ……………….. if file or directory is hidden.
(A) tme
(B) false
(C) hidden
(D) hide
Answer:
(A) tme

Question 78.
Which method returns the Absolute path of a file ?
(A) Long length ()
(B) String getPath()
(C) String getName ()
(D) String getAbsolutePath()
Answer:
(D) String getAbsolutePath()

Question 79.
Which method of the name of file or directory referred by the object ?
(A) Long length ()
(B) String getPath()
(C) String getName()
(D) String getAbsolutePath()
Answer:
(C) String getName()

Question 80.
Which method returns the path to the file or directory ?
(A) Long length ()
(B) String getPath()
(C) String getName()
(D) String getAbsolutePath()
Answer:
(B) String getPath()

GSEB Std 12 Computer MCQ Answers Ch 11 File Handling

Question 81.
Which method returns the number of bytes in , the file ?
(A) Long length ()
(B) String getPath()
(C) String getName()
(D) String getAbsolutePath()
Answer:
(A) Long length ()

Question 82.
What is returned by long length!( method ?
(A) Characters in a file
(B) Words in file
(C) Bits of file
(D) Bytes of file
Answer:
(D) Bytes of file

Question 83.
Which method returns the name of the files and directories in directory ?
(A) String[ ] list()
(B) File[ ] listFiles()
(C) String() list[ ]
(D) File() listFiles[ ]
Answer:
(A) String[ ] list()

Question 84.
What is returned by String! ] list!) method ?
(A) File names available in a directory
(B) Directory names available in a directory
(C) (A) and (B) both
(D) None of these
Answer:
(C) (A) and (B) both

Question 85.
Which method returns an array of abstract pathnames denoting the files in the directory ?
(A) String[ ] list( )
(B) File[ ] listFiles( )
(C) String( ) list[ ]
(D) File( ) listFiles[ ]
Answer:
(B) File[ ] listFiles( )

Question 86.
………………… can return the list file files and directories of a specified directory.
(A) list()
(B) object()
(C) class()
(D) files()
Answer:
(A) list()

GSEB Std 12 Computer MCQ Answers Ch 11 File Handling

Question 87.
……………… can be used to get the result available in the directory.
(A) According path
(B) Names of files
(C) (A) and (B) both
(D) None of these
Answer:
(C) (A) and (B) both

Question 88.
To edit the file or display the content of a file, knowledge of ……………….. is important.
(A) stroke
(B) stream
(C) editor
(D) application
Answer:
(B) stream

Question 89.
For ………………., stream class is used.
(A) to write in a file
(B) to read a file from file
(C) (A) and (B) both
(D) none of these
Answer:
(C) (A) and (B) both

Question 90.
Keyboard is a ……………… type of device.
(A) input
(B) output
(C) input/output
(D) storage
Answer:
(A) input

Question 91.
Monitor is a ……………… type of device.
(A) input
(B) output
(C) input/output
(D) storage
Answer:
(B) output

Question 92.
Hard disk is a ……………… type of device.
(A) input
(B) output
(C) input/output
(D) storage
Answer:
(C) input/output

Question 93.
Due to ……………., hard disk is considered as input and output both devices.
(A) data can be read from the hard disk.
(B) data can be written in a hard disk.
(C) (A) and (B) both
(D) none of these.
Answer:
(C) (A) and (B) both

GSEB Std 12 Computer MCQ Answers Ch 11 File Handling

Question 94.
……………. can be different with the harddisks.
(A) Manufacturer
(B) Storage
(C) Connection
(D) All of these
Answer:
(D) All of these

Question 95.
………….. is not a concern for the programmer related to the hard disk.
(A) Due to process of file provided by Java.
(B) Due to process of stream provided by Java.
(C) Due to process of connections provided by Java.
(D) Due to process of path provided by Java.
Answer:
(B) Due to process of stream provided by Java.

Question 96.
………….. is an abstract representation of an input or output device that is used as source or destination of data.
(A) Stream
(B) Class
(C) Path
(D) String
Answer:
(A) Stream

Question 97.
We can visualize a stream of program as ………………. .
(A) a sequence of bytes that flows into the program
(B) a sequence of bytes that flows out of the program
(C) (A) or (B)
(D) none of these
Answer:
(C) (A) or (B)

Question 98.
What can be done using a stream ?
(A) Data can be written
(B) Data can be read
(C) (A) and (B) both
(D) None of these
Answer:
(C) (A) and (B) both

Question 99.
Which sentence is true for the stream ?
(1) It is an abstract representation of an input or output device.
(2) It is a sequence of bytes that flows into the program or out of the program.
(3) Read or write process can be done using a stream.
(4) Process stream and storage stream are the types of stream.
(A) 1, 3, 4
(B) 1, 2, 4
(C) 2, 3, 4
(D) 1, 2, 3
Answer:
(D) 1, 2, 3

Question 100.
The process of writing a data through stream is called ………………. .
(A) output stream
(B) input stream
(C) process stream
(D) storage stream
Answer:
(A) output stream

GSEB Std 12 Computer MCQ Answers Ch 11 File Handling

Question 101.
What can be done through the output stream ?
(A) Data can be transferred from program to the file of hard disk.
(B) Data can be transferred from program to the monitor
(C) Data can be transferred from program to the computer over network.
(D) All of these
Answer:
(D) All of these

Question 102.
To read the data from external device to the program is called ………………… .
(A) output stream
(B) input stream
(C) process stream
(D) storage stream
Answer:
(B) input stream

Question 103.
Which process can be done through input stream ?
(A) It can transfer data from keyboard to the program.
(B) It can transfer data from the file to the hard disk to the program.
(C) (A) and (B) both
(D) None of these.
Answer:
(C) (A) and (B) both

Question 104.
What is the reason for using stream for input or output operations ?
(A) To make the program independent from the devices.
(B) To make the program connected to the devices.
(C) To display the program as devices.
(D) To start the program through devices.
Answer:
(A) To make the program independent from the devices.

Question 105.
What is true about input and output stream ?
(1) When we write the data to the stream it is called output stream.
(2) Output stream can transfer the data from keyboard or the hard disk to the program.
(3) When we read the data from the devices is called the input stream.
(4) Input stream can transfer the data from program to the harddiscs file or transfer the data to monitor or network computer.
(A) 1, 2
(B) 3, 4
(C) 1, 3
(D) 2, 4
Answer:
(C) 1, 3

Question 106.
How many advantages of stream are there ?
(A) Two
(B) Three
(C) Four
(D) Five
Answer:
(A) Two

Question 107.
Which option shows the advantage of stream ?
(A) Programmers do not need to worry about the technical details of the device.
(B) The program can work for a variety of input or output devices without any changes to the source code.
(C) (A) and (B) both
(D) None of these.
Answer:
(C) (A) and (B) both

GSEB Std 12 Computer MCQ Answers Ch 11 File Handling

Question 108.
Using ……………….., the program can work for a variety of input or output devices without any changes to the source code.
(A) Function
(B) Stream
(C) Folder
(D) Code
Answer:
(B) Stream

Question 109.
What is a byte stream ?
(A) Binary stream
(B) Word stream
(C) File stream
(D) Process stream
Answer:
(A) Binary stream

Question 110.
What is a character stream ?
(A) Binary stream
(B) Word stream
(C) File stream
(D) Process stream
Answer:
(B) Word stream

Question 111.
In a character stream …………….. is the value of 5.
(A) ASCII
(B) Binary
(C) (A) and
(B) both
(D) None of these
Answer:
(A) ASCII

Question 112.
In a character stream, ……………….. is the ASCII value of 5.
(A) 00110111
(B) 00000101
(C) 00110101
(D) 00000111
Answer:
(C) 00110101

Question 113.
In the binary presentation, ………………. will be the binary value of 5.
(A) 00110111
(B) 00000101
(C) 00110101
(D) 00000111
Answer:
(B) 00000101

Question 114.
Any characters is stored using ……………….. .
(A) ASCII
(B) Unicode
(C) (A) or (B)
(D) None of these
Answer:
(C) (A) or (B)

Question 115.
ASCII stands for ………………… .
(A) American Standard Code for Interchange Information
(B) American Standard Code for Information Interchange
(C) American Standard Code for Information Intersection
(D) American Standard Code for Intersection Information
Answer:
(B) American Standard Code for Information Interchange

GSEB Std 12 Computer MCQ Answers Ch 11 File Handling

Question 116.
Unicode stands for ……………….. .
(A) Universal trunk – out-of-service CODE
(B) Universal trunk – out-of-source CODE
(C) Universal trunk – out-of-save CODE
(D) Universal trunk – out-of-section CODE
Answer:
(A) Universal trunk – out-of-service CODE

Question 117.
If any value to be used for calculation then its ………………. is meaningful.
(A) character value
(B) image value
(C) binary value
(D) functional valueAnswer:
Answer:
(C) binary value

Question 118.
For calculation purpose ……………… data type can be used.
(A) int
(B) float
(C) double
(D) any of these
Answer:
(D) any of these

Question 119.
int, float or double can store the data in the form of ……………. .
(A) binary
(B) character
(C) word
(D) pictorial
Answer:
(A) binary

Question 120.
If calculation is not to be done then data can be represented as ……………….. .
(A) binary
(B) character
(C) (A) or (B)
(D) pictorial
Answer:
(B) character

Question 121.
How many streams are valid in Java ?
(A) Two
(B) Three
(C) Four
(D) Five
Answer:
(A) Two

Question 122.
Which stream is valid in Java ?
(A) Byte Stream / Binary Stream
(B) Character Stream
(C) (A) and (B) both
(D) None of these
Answer:
(C) (A) and (B) both

GSEB Std 12 Computer MCQ Answers Ch 11 File Handling

Question 123.
The stream transferring the data to the file or device in the form of byte is called ………………. .
(A) byte stream
(B) binary stream
(C) (A) or (B)
(D) character stream
Answer:
(C) (A) or (B)

Question 124.
The file created using the byte stream is called ……………. .
(A) binary file
(B) character stream
(C) (A) or (B)
(D) none of these
Answer:
(A) binary file

Question 125.
To store ………………. type of variable binary file is used.
(A) integer
(B) double
(C) boolean
(D) all of these
Answer:
(D) all of these

Question 126.
To store …………….., binary file is used.
(A) array
(B) object
(C) (A) and (B) both
(D) none of these
Answer:
(C) (A) and (B) both

Question 127.
Character stream can be opened in ………………. text editor.
(A) vi
(B) SciTE
(C) (A) and (B) both
(D) None of these
Answer:
(C) (A) and (B) both

Question 128.
vi stands for …………… .
(A) visual editor
(B) vertical editor
(C) video editor
(D) valuable editor
Answer:
(A) visual editor

GSEB Std 12 Computer MCQ Answers Ch 11 File Handling

Question 129.
SciTE stands for …………. .
(A) Science base Text Editor
(B) Scientific Text Editor
(C) Section Text Editor
(D) Scintilla Text Editor
Answer:
(D) Scintilla Text Editor

Question 130.
How many sets of class are provided by Java stream ?
(A) Two
(B) Three
(C) Four
(D) Five
Answer:
(A) Two

Question 131.
Which set of class is provided by Java stream ?
(A) Byte Classes/Binary Class
(B) Character Classes
(C) (A) and (B) both
(D) None of these
Answer:
(C) (A) and (B) both

Question 132.
The class working with binary data in java.io package is called ……………… .
(A) byte class
(B) binary class
(C) character class
(D) (A) or (B)
Answer:
(D) (A) or (B)

Question 133.
The class working with binary data in ……………… package is called byte class or binary class.
(A) java.stream
(B) java.io
(C) java.class
(D) java.package
Answer:
(B) java.io

Question 134.
How many types are there for byte class or binary class ?
(A) Two
(B) Three
(C) Four
(D) Five
Answer:
(A) Two

Question 135.
……………. is the type of byte class or binary class.
(A) Input stream Class
(B) Output stream Class
(C) (A) and (B) both
(D) None of these
Answer:
(C) (A) and (B) both

GSEB Std 12 Computer MCQ Answers Ch 11 File Handling

Question 136.
Input stream class reads the data from …………….. .
(A) file
(B) keyboard
(C) monitor
(D) (A) or (B)
Answer:
(D) (A) or (B)

Question 137.
…………….. stream class can write the data to the file or output device.
(A) Input stream class
(B) Output stream class
(C) (A) and (B) both
(D) None of these
Answer:
(B) Output stream class

Question 138.
The class working with character or data in java.io package is called ……………….. .
(A) character stream class
(B) byte class
(C) input stream class
(D) output stream lass
Answer:
(A) character stream class

Question 139.
How many types of character class are there ?
(A) Two
(B) Three
(C) Four
(D) Five
Answer:
(A) Two

Question 140.
……………. is the type of character class.
(A) Input class, output class
(B) Reader class, writer class
(C) (A) and (B) both
(D) None of these
Answer:
(B) Reader class, writer class

Question 141.
Collection of ……………….. class is there in java.io package.
(A) stream class
(B) user class
(C) master class
(D) character class
Answer:
(A) stream class

Question 142.
java.io package makes ……………….. process possible .
(A) to write in a file
(B) to read a file
(C) (A) and (B) both
(D) none of these
Answer:
(C) (A) and (B) both

GSEB Std 12 Computer MCQ Answers Ch 11 File Handling

Question 143.
To use the stream class, ………………. package is to be imported by a program.
(A) java.stream
(B) java.io
(C) java.class
(D) java.database
Answer:
(B) java.io

Question 144.
Character stream class is the collection of class available in ………………. character stream class.
(A) java.io
(B) java.class
(C) java.stream
(D) java.database
Answer:
(A) java.io

Question 145.
Character stream class can be used for ……………. .
Unicode characters for reading or writing.
(A) 4-bit
(B) 8-bit
(C) 16-bit
(D) 32-bit
Answer:
(C) 16-bit

Question 146.
For …………….. character stream class can be used.
(A) to read characters
(B) to write characters
(C) to read pictures
(D) (A) and (B) both
Answer:
(D) (A) and (B) both

Question 147.
Character stream class is divided into how many classes ?
(A) Two
(B) Three
(C) Four
(D) Five
Answer:
(A) Two

Question 148.
…………….. is the type of character stream class.
(A) Reader Class
(B) Writer Class
(C) (A) and (B) both
(D) None of these
Answer:
(C) (A) and (B) both

Question 149.
How many types are there for character stream class or object ?
(A) Two
(B) Three
(C) Four
(D) Five
Answer:
(A) Two

GSEB Std 12 Computer MCQ Answers Ch 11 File Handling

Question 150.
……………………. is the type of character stream class or object class.
(A) InputStreamReader, BufferedReader
(B) OutputStreamWriter,BufferedWriter
(C) Reader, Writer
(D) FileWriter
Answer:
(C) Reader, Writer

Question 151.
How many subclasses are there for Reader class ?
(A) Two
(B) Three
(C) Four
(D) Five
Answer:
(A) Two

Question 152.
Which is the subclass of the Reader class ?
(A) OutputStreamWriter, BufferedWriter
(B) InputStreamReader, BufferedReader
(C) FileWriter
(D) Reader, Writer
Answer:
(B) InputStreamReader, BufferedReader

Question 153.
How many subclasses have InputStreamReader ?
(A) One
(B) Two
(C) Three
(D) Four
Answer:
(A) One

Question 154.
……………….. is the subclass of InputStreamReader.
(A) FileWriter
(B) FileReader
(C) PrintWriter
(D) InputReader
Answer:
(B) FileReader

Question 155.
How many subclasses have the writer class ?
(A) Two
(B) Three
(C) Four
(D) Five
Answer:
(B) Three

Question 156.
…………….. is the subclass of writer class.
(A) OutputStreamWriter
(B) BufferedWriter
(C) PrintWriter
(D) All of these
Answer:
(D) All of these

Question 157.
OutputStreamWriter has how many subclasses ?
(A) One
(B) Two
(C) Three
(D) Four
Answer:
(A) One

GSEB Std 12 Computer MCQ Answers Ch 11 File Handling

Question 158.
………….. is the subclass of OutputStreamWriter.
(A) FileWriter
(B) FileReader
(C) PrintWriter
(D) InputReader
Answer:
(A) FileWriter

Question 159.
……………… type of class is Object class.
(A) Overwrite
(B) Extract
(C) Exit
(D) Abstract
Answer:
(D) Abstract

Question 160.
Class which is not used to create the objects is called ……………… .
(A) hidden class
(B) abstract class
(C) used class
(D) null class
Answer:
(B) abstract class

Question 161.
Abstract class is available with the set of methods executed by …………….. .
(A) sub class
(B) master class
(C) function class
(D) user class
Answer:
(A) sub class

Question 162.
The explanation of different methods and constructors are available on ………………. website.
(A) http://docs.oracle.org
(B) http://docs.oracle.in
(C) http://docs.oracle.com
(D) http://docs.oracle.java
Answer:
(C) http://docs.oracle.com

Question 163.
……………….. is the basic class of writing a characters stream.
(A) Reader class
(B) Writer class
(C) (A) and (B) both
(D) None of these
Answer:
(B) Writer class

GSEB Std 12 Computer MCQ Answers Ch 11 File Handling

Question 164.
Which class represents the specific process ?
(A) Abstract writer class
(B) Abstract master class
(C) Abstract user class
(D) Abstract function class
Answer:
(A) Abstract writer class

Question 165.
Which class is used to make writing process in a file ?
(A) FileWrite
(B) FileRead
(C) FileWriter
(D) FileReader
Answer:
(C) FileWriter

Question 166.
Method of writer class sends the throw to ……………… .
(A) IOExample
(B) IOException
(C) IOExtension
(D) IOExchange
Answer:
(B) IOException

Question 167.
If the I/O process is ……………… then IOException is generated.
(A) Sucessful
(B) Fast
(C) Fail
(D) Medium
Answer:
(C) Fail

Question 168.
Which sentence is true about IOException ?
(1) Method of writer class sends the throw to IOException
(2) If the I/O process is fail then IOException is generated.
(3) IOException is the checked exception.
(4) It is necessary to take care of IOException otherwise error occurs while compiling.
(A) 1, 2
(B) 1, 2, 3
(C) 1, 2, 3, 4
(D) None of these
Answer:
(C) 1, 2, 3, 4

Question 169.
Which option shows the method of writer class used by subclass ?
(A) void close ()
(B) void write (int c)
(C) void write (string s)
(D) All of these
Answer:
(D) All of these

Question 170.
………………… closes the stream of writer class.
(A) void close()
(B) void write (int c)
(C) void write (string s)
(D) Any of these
Answer:
(A) void close()

GSEB Std 12 Computer MCQ Answers Ch 11 File Handling

Question 171.
……………….. writes the lower 16 bits of ’c’ to the stream.
(A) void close ()
(B) void write (int c)
(C) void write (string s)
(D) Any of these
Answer:
(B) void write (int c)

Question 172.
……………. writes string ‘s’ to the stream.
(A) void close()
(B) void write (int c)
(C) void write (string s)
(D) Any of these
Answer:
(C) void write (string s)

Question 173.
……………. expands the writer class.
(A) OutputStreamWriter
(B) OutputStreamReader
(C) OutputStreamWrite
(D) OutputStreamRead
Answer:
(A) OutputStreamWriter

Question 174.
OutputStreamWriter class converts stream of characters to ………………. .
(A) stream of characters
(B) stream of bytes
(C) stream of strings
(D) any of these
Answer:
(B) stream of bytes

Question 175.
OutputStreamWriter class is expanded by …………….. class.
(A) FileRead class
(B) FileWrite class
(C) FileReader class
(D) FileWriter class
Answer:
(D) FileWriter class

Question 176.
FileWriter class gives ………………… as a result in a file.
(A) character
(B) byte
(C) symbol
(D) image
Answer:
(A) character

Question 177.
…………… shows the constructor of FileWriter class.
(A) FileWriter(String filepath) throws 10 Exception
(B) FileWriter(File fileobj) throws IOException
(C) FileWriter(String filepath, Boolean append) throws IOException
(D) All of these
Answer:
(D) All of these

GSEB Std 12 Computer MCQ Answers Ch 11 File Handling

Question 178.
In FileWriter(String filepath) throws IOException, ………………. is the filepath.
(A) Parameter
(B) Object
(C) File format
(D) File size
Answer:
(A) Parameter

Question 179.
In FileWriter(String filepath) throws IOException, what is indicated by filepath parameter ?
(A) File name
(B) Full pathname of file
(C) File format
(D) File size
Answer:
(B) Full pathname of file

Question 180.
In FileWriter (File fileobj) throws IOException, what is fileobj ?
(A) File size
(B) File format
(C) Object
(D) Parameter
Answer:
(C) Object

Question 181.
In FileWriter(File fileobj) throws IOException what is indicated by fileobj ?
(A) File explanation
(B) File name
(C) File path
(D) File size
Answer:
(A) File explanation

Question 182.
In FileWriter(String filepath, Boolean append) throws IOException, if value of append is true then what is done ?
(A) Text is overwritten in the current file
(B) Text is added at the end of the file
(C) (A) or (B)
(D) None of these.
Answer:
(B) Text is added at the end of the file

Question 183.
Using ………………, object of FileWriter can be created.
(A) FileWriter fwobject = new FileWriter (“/java/ files / Charfile 1. obj”);
(B) FileWriter fwobject = new FileWriter (“/java/ files/Charfile 1 .java”);
(C) FileWriter fwobject = new FileWriter (“/java/ files / Charfile 1. exe”);
(D) FileWriter fwobject = new FileWriter (“/java/ files/Charfile 1 .txt”);
Answer:
(D) FileWriter fwobject = new FileWriter (“/java/ files/Charfile 1 .txt”);

Question 184.
Using ………………, text can be written in file.
(A) write ()
(B) type()
(C) print()
(D) note
Answer:
(A) write ()

Question 185.
………………. method is inherited from the Writer Class.
(A) write()
(B) close ()
(C) (A) and (B) both
(D) None of these
Answer:
(C) (A) and (B) both

GSEB Std 12 Computer MCQ Answers Ch 11 File Handling

Question 186.
……………… is important after writing of file is completed.
(A) To start the stream object
(B) To close the stream object
(C) To store the stream object
(D) To run the stream object
Answer:
(B) To close the stream object

Question 187.
……………. file can use the resources of the computer system.
(A) Open file
(B) Close file
(C) (A) and (B) both
(D) None of these
Answer:
(A) Open file

Question 188.
…………….. files depending on the file mode, other programs may not be able to access them.
(A) Open files
(B) Close files
(C) (A) and (B) both
(D) None of these
Answer:
(A) Open files

Question 189.
……………… command can be used to view the content of the file.
(A) view
(B) run
(C) display
(D) cat
Answer:
(D) cat

Question 190.
…………….. is the base class for reading a character
stream.
(A) Read class
(B) Write class
(C) Reader class
(D) Writer class
Answer:
(C) Reader class

Question 191.
………………… class is used to read the data from a file.
(A) FileReader class
(B) FileRead class
(C) FileWriter class
(D) FileWrite class
Answer:
(A) FileReader class

Question 192.
…………….. is the method of Reader class.
(A) void close()
(B) void read()
(C) (A) and (B) both
(D) None of these
Answer:
(C) (A) and (B) both

GSEB Std 12 Computer MCQ Answers Ch 11 File Handling

Question 193.
……………… closes the stream of Reader class.
(A) void close ()
(B) void read()
(C) (A) and (B) both
(D) None of these
Answer:
(A) void close ()

Question 194.
……………… method of Reader class reads next available character from the stream.
(A) void close ()
(B) void read()
(C) (A) and (B) both
(D) None of these
Answer:
(B) void read()

Question 195.
…………… method of Reader class reads next available character from the stream and returns -1 to indicate the end of stream.
(A) void close()
(B) void read()
(C) (A) and (B) both
(D) None of these
Answer:
(B) void read()

Question 196.
……………. class expands the Reader class.
(A) InputStreamReader
(B) InputStreamRead
(C) OutputStreamReader
(D) OutputStreamRead
Answer:
(A) InputStreamReader

Question 197.
InputStreamReader class converts the stream of bytes to ……………….. .
(A) Stream of binary
(B) Stream of symbols
(C) Stream of characters
(D) Stream of image
Answer:
(C) Stream of characters

Question 198.
……………… class expands the InputStreamReader class.
(A) FileRead
(B) FileReader
(C) FileWrite
(D) FileWriter
Answer:
(B) FileReader

GSEB Std 12 Computer MCQ Answers Ch 11 File Handling

Question 199.
FileReader Class reads …………….. from the file.
(A) characters
(B) symbols
(C) binary values
(D) pictorial information
Answer:
(A) characters

Question 200.
……………… shows the constructor of FileReader class.
(A) FileReader(String filepath) throws
FileNotFoundException
(B) FileReader(File fileobj) throws
FileNotFoundException
(C) (A) and (B) both
(D) None of these
Answer:
(C) (A) and (B) both

Question 201.
Using ……………… method of FileReader class data can be read from a file.
(A) read()
(B) reader()
(C) write()
(D) writer()
Answer:
(A) read()

Question 202.
……………. class is inherited from the Reader class.
(A) reader
(B) read
(C) writer
(D) write
Answer:
(B) read

Question 203.
……………. is used to denote (EOF) End Of File.
(A) Character
(B) Digit
(C) Common symbol
(D) Special symbol
Answer:
(D) Special symbol

Question 204.
EOF stands for …………….. .
(A) End of File
(B) End of Folder
(C) End of Form
(D) End of Frame
Answer:
(A) End of File

Question 205.
Program reads the data from …………….. stream.
(A) storage
(B) process
(C) input
(D) output
Answer:
(C) input

Question 206.
java uses …………….. to indicate the End Of Data using read() method.
(A) – 1
(B) 0
(C) 1
(D) Any of these
Answer:
(A) – 1

GSEB Std 12 Computer MCQ Answers Ch 11 File Handling

Question 207.
Using ………………. package, various processes on the characters can be done.
(A) java.io
(B) java.class
(C) java.object
(D) javaxharater
Answer:
(A) java.io

Question 208.
For ……………… type of tasks calculations is needed to be done in a program.
(A) to store inventory data
(B) to calculate the cost involved
(C) to store the employee details and their salaries
(D) all of these
Answer:
(D) all of these

Question 209.
……………. feature is provided by Java for statistical calculation.
(A) Binary stream
(B) Class using the binary stream
(C) (A) and (B) both
(D) None of these
Answer:
(C) (A) and (B) both

Question 210.
Using ………………. class of java.io package, the feature of reading or writing in a file is provided.
(A) FilelnputStream
(B) FileOutputStream
(C) (A) and (B) both
(D) None of these
Answer:
(C) (A) and (B) both

Question 211.
Using FilelnputStream and FileOuputStream class of java.io package, the feature of ……………… is provided.
(A) To write in file
(B) To read from a file
(C) To add image to the file
(D) (A) and (B) both
Answer:
(D) (A) and (B) both

Question 212.
……………. class provides the feature of writing in the form of bytes in a file.
(A) FilelnputStream
(B) FileOutputStream
(C) (A) and (B) both
(D) None of these
Answer:
(A) FilelnputStream

Question 213.
………………. class provides the feature of reading in the form of bytes in a file.
(A) FilelnputStream
(B) FileOutputStream
(C) (A) and (B) both
(D) None of these
Answer:
(B) FileOutputStream

GSEB Std 12 Computer MCQ Answers Ch 11 File Handling

Question 214.
FilelnputStream is the subclass of …………….. class.
(A) InputStream
(B) OutputStream
(C) InputReader
(D) OutputReader
Answer:
(A) InputStream

Question 215.
FilelnputStream class can be used for ……………….. .
(A) to write bytes in a file
(B) to modify bytes in a file
(C) to read bytes in a file
(D) to delete bytes in a file
Answer:
(C) to read bytes in a file

Question 216.
……………… shows the method of FilelnputStream class.
(A) void close()
(B) int read()
(C) int read(byte[ ] b)
(D) All of these
Answer:
(D) All of these

Question 217.
……………. method of FilelnputStream class closes the stream.
(A) void close()
(B) int read()
(C) int read(byte[ ] b)
(D) int write()
Answer:
(A) void close()

Question 218.
…………….. method of FilelnputStream class releases any system resources associated with the stream.
(A) void close()
(B) int read()
(C) int read(byte[ ] b)
(D) int write()
Answer:
(A) void close()

Question 219.
…………….. method of FilelnputStream class reads the bytes from input stream.
(A) void close()
(B) int read()
(C) int read(byte[ ] b)
(D) int write()
Answer:
(B) int read()

Question 220.
………….. method of FilelnputStream class reads up to b.length bytes from the specified byte array to file output stream.
(A) void close()
(B) int read()
(C) int read(byte[ ] b)
(D) int write()
Answer:
(C) int read(byte[ ] b)

GSEB Std 12 Computer MCQ Answers Ch 11 File Handling

Question 221.
FileOutputStream is the subclass of ……………. class.
(A) OutputStream
(B) InputStream
(C) ProcessStream
(D) MemoryStream
Answer:
(A) OutputStream

Question 222.
Using …………….. class, bytes can be written to the output stream of the file.
(A) ProcessStream
(B) MemoryStream
(C) FileOutputStream
(D) FilelnputStream
Answer:
(C) FileOutputStream

Question 223.
To use FileOutputStream class, …………… is to be created first.
(A) File function
(B) File object
(C) File class
(D) File stream
Answer:
(B) File object

Question 224.
Arrange the steps for using FileOutputStream class.
(1) To use the write method.
(2) Go to the OutputStream abstract class to write bytes in file.
(3) Make the file object.
(A) 1, 2, 3
(B) 1, 3, 2
(C) 2, 3, 1
(D) 3, 2, 1
Answer:
(D) 3, 2, 1

Question 225.
…………….. shows the method of FileOutStream class.
(A) void close()
(B) void write (int b)
(C) void write (byte [] b)
(D) All of these
Answer:
(D) All of these

Question 226.
…………… method of FileOutputStream class, closes the output stream.
(A) void close()
(B) void write (int b)
(C) void write (byte[] b)
(D) void read()
Answer:
(A) void close()

GSEB Std 12 Computer MCQ Answers Ch 11 File Handling

Question 227.
……………. method of FileOutputStream class closes the file output stream and releases the any system resources associated with the stream.
(A) void close()
(B) void write (int b)
(C) void write (byte[] b)
(D) void read()
Answer:
(A) void close()

Question 228.
…………….. method of FileOutputStream class writes the specified byte to the file output stream.
(A) void close()
(B) void write (int b)
(C) void write (byte [] b)
(D) void read()
Answer:
(B) void write (int b)

Question 229.
……………. method of FileOutputStream class writes b.length bytes from the specified byte array to the file output stream.
(A) void close()
(B) void write (int b)
(C) void write (byte [] b)
(D) void read()
Answer:
(C) void write (byte [] b)

Question 230.
…………… classes are used respectively to write in a file and read from a file.
(A) FilelnputStream and FileOutputStream
(B) FileOutputStream and FilelnputStream
(C) FileWriteStream and FileReadStream
(D) FileReadStream and FileWriteStream
Answer:
(A) FilelnputStream and FileOutputStream

Question 231.
When reading process is completed then ………………. is executed to convert integers to characters.
(A) typecasting
(B) typechosing
(C) typechanging
(D) typecasting
Answer:
(D) typecasting

Question 232.
Any program can get data input using ……………… methods.
(A) two
(B) three
(C) four
(D) five
Answer:
(B) three

Question 233.
…………….. is the method to get data input for the program.
(A) Live intersection through GUI or keyboard.
(B) Using command line arguments
(C) Getting input from a file
(D) Any of these
Answer:
(D) Any of these

Question 234.
How many techniques are most widely using to get input from the keyboard ?
(A) Two
(B) Three
(C) Four
(D) Five
Answer:
(A) Two

GSEB Std 12 Computer MCQ Answers Ch 11 File Handling

Question 235.
………….. shows the technique used to get input from the keyboard.
(A) Use of Scanner Class from java.io package.
(B) Use of Console Class from java.io package.
(C) (A) and (B) both
(D) None of these
Answer:
(C) (A) and (B) both

Question 236.
Scanner class is a part of …………….. package.
(A) java.io
(B) java.util
(C) java.obj
(D) java.scan
Answer:
(B) java.util

Question 237.
……………….. is the class of java.util package.
(A) Scanner Class
(B) Console Class
(C) (A) and (B) both
(D) None of these
Answer:
(A) Scanner Class

Question 238.
………………. provides various methods to read input from the keyboard from the file.
(A) Master Class
(B) Object Class
(C) Scanner Class
(D) Console Class
Answer:
(C) Scanner Class

Question 239.
class is used to read the input of the user.
(A) Console Class
(B) Scanner Class
(C) Master Class
(D) Object Class
Answer:
(B) Scanner Class

Question 240.
…………… breaks the input string into tokens using a delimiter.
(A) Master Class
(B) Object Class
(C) Scanner Class
(D) Console Class
Answer:
(C) Scanner Class

Question 241.
Scanner class breaks the input string into tokens using a ……………….. .
(A) delimiter
(B) datarniter
(C) inputmiter
(D) scannermiter
Answer:
(A) delimiter

Questipon 242.
……………… is the default delimiter to break the string.
(A) ‘|’ Symbol
(B) # (Hash Symbol)
(C) Full Space
(D) White Space
Answer:
(D) White Space

GSEB Std 12 Computer MCQ Answers Ch 11 File Handling

Question 243.
………………… shows the method of constructor and scanner class.
(A) Scanner (String str)
(B) Scanner (InputStream isobject)
(C) Scanner (File fobject) throws FileNotFoundException
(D) All of these
Answer:
(D) All of these

Question 244.
Scanner class can be created using …………… .
(A) Tokens / words
(B) File object
(C) InputStream object
(D) Any of these
Answer:
(D) Any of these

Question 245.
…………… method of scanner class is used to read from the file.
(A) Scanner fileinput = new Scanner [new File (” Student, dat”)];
(B) Scanner fileinput = new Scanner (new FileCStudent.dat”));
(C) Scanner fileinput = new Scanner (new File [” Student, dat”]);
(D) Scanner fileinput = new Scanner (new File{“Student.dat”});
Answer:
(B) Scanner fileinput = new Scanner (new FileCStudent.dat”));

Question 246.
……………. method of scanner class is used to read the data from keyboard.
(A) Scanner kbinput = new Scanner (System.in);
(B) Scanner kboardinput = new Scanner (System.in);
(C) Scanner keyinput = new Scanner (System.in);
(D) Scanner keyboardinput = new Scanner (System.in);
Answer:
(A) Scanner kbinput = new Scanner (System.in);

Question 247.
……………… is the method of scanner class.
(A) void close ()
(B) String next()
(C) Boolean hasNext()
(D) All of these
OR
(A) int nextlnt()
(B) float nextFloat[]
(C) String nextLine()
(D) All of these
Answer:
(D) All of these

Question 248.
…………… method of scanner class is used to close the scanner.
(A) void close ()
(B) String next()
(C) Boolean hasNext()
(D) int nextlnt()
Answer:
(A) void close ()

Question 249.
……………. method of scanner class is used to return the next token.
(A) void close()
(B) String next()
(C) Boolean hasNext()
(D) int nextlnt()
Answer:
(B) String next()

GSEB Std 12 Computer MCQ Answers Ch 11 File Handling

Question 250.
………….. method of scanner class is used to return true if there is a token in input.
(A) void close ()
(B) String next()
(C) Boolean hasNext()
(D) int nextlnt()
Answer:
(C) Boolean hasNext()

Question251.
Boolean hasNextO of input class returns ………………. if there is a token in input.
(A) true
(B) false
(C) 0
(D) 1
Answer:
(A) true

Question 252.
……………. method of scanner class is used to scan the next token of the input as int.
(A) void close()
(B) String next()
(C) Boolean hasNext()
(D) int nextlnt()
Answer:
(D) int nextlnt()

Question 253.
int nextlnt() method of Scanner class scans the next token of the input as ……………. .
(A) character
(B) null
(C) integer
(D) float
Answer:
(C) integer

Question 254.
………….. method of scanner class is used to scan the next token of the input as float.
(A) int nextlnt()
(B) float nextFloat()
(C) String nextLine()
(D) Boolean hasNext()
Answer:
(B) float nextFloat()

Question 255.
int nextFloat() method of Scanner class scans the next token of the input as …………….. .
(A) character
(B) null
(C) integer
(D) float
Answer:
(D) float

Question 256.
……………… method of scanner class is used to scan the next token of the input as line.
(A) int nextlnt()
(B) float nextFloat()
(C) String nextLine()
(D) Boolean hasNext()
Answer:
(C) String nextLine()

GSEB Std 12 Computer MCQ Answers Ch 11 File Handling

Question 257.
……………. class is used to read the data from file.
(A) Scanner Class
(B) Master Class
(C) Console Class
(D) Reader Class
Answer:
(A) Scanner Class

Question 258.
Console class is a part of …………….. package.
(A) java.obj
(B) java.scan
(C) java.io
(D) java.util
Answer:
(C) java.io

Question 259.
…………….. class provides various methods to get input from the keyboard.
(A) Scanner Class
(B) Console Class
(C) Master Class
(D) User Class
Answer:
(B) Console Class

Question 260.
………….. class is used when the input is to be typed in hidden form.
(A) Console Class
(B) Scanner Class
(C) User Class
(D) Master Class
Answer:
(A) Console Class

Question 261.
…………. class provides a method for reading a password.
(A) Scanner Class
(B) Console Class
(C) Master Class
(D) User Class
Answer:
(B) Console Class

Question 262.
When reading the password …………… is done by console class.
(A) User input will be hidden or not shown in the console screen.
(B) Input is not displayed on the console screen.
(C) Input return value is the array of characters
(D) All of these
Answer:
(D) All of these

Question 263.
……………. is the method of the console class.
(A) String readLine()
(B) char [ ] readPassword
(C) Console printf(String, format, Object args)
(D) All of these
Answer:
(D) All of these

Question 264.
…………….. method of console class reads a single line of text from the console.
(A) String readLine()
(B) char [ ] readPassword
(C) Console printf(String format, Object args)
(D) String writeLine()
Answer:
(A) String readLine()

Question 265.
Method of Console class reads a ……………….. from the console.
(A) One character of text
(B) One word of text
(C) One line of text
(D) One paragraph of text
Answer:
(C) One line of text

GSEB Std 12 Computer MCQ Answers Ch 11 File Handling

Question 266.
…………….. method of console class reads password or passphrase from the console with echoing disabled.
(A) String readLine()
(B) char [ ] readPassword
(C) Console printf(String format, Object args)
(D) String writeLine()
Answer:
(B) char [ ] readPassword

Question 267.
char [ ] readPassword method of Console class reads ……………… from the console with echoing disabled.
(A) password
(B) passphrase
(C) (A) or (B)
(D) None of these
Answer:
(C) (A) or (B)

Question 268.
…………….. method is used to write a formatted string to the console’s output.
(A) String readLine()
(B) char [ ] readPassword
(C) Console printf(String format, Object args)
(D) String write Line ()
Answer:
(C) Console printf(String format, Object args)

Question 269.
…………….. class is used to read username and password.
(A) Console Class
(B) Scanner Class
(C) User Class
(D) Master Class
Answer:
(A) Console Class

Question 270.
Using Java file ………………… class and method are provided.
(A) Class to save objects
(B) Class to retrieve objects
(C) Class to use the files randomly
(D) All of these
Answer:
(D) All of these

Question 271.
For ……………… operations, the methods are available in Java.
(A) Sequential
(B) To go directly to n-number record
(C) (A) and (B) both
(D) None of these
Answer:
(C) (A) and (B) both

Leave a Comment

Your email address will not be published. Required fields are marked *