CBSE Class 12 Computer Science File Handling MCQs Set 01

Multiple Choice Questions (MCQs) for Class 12 Computer Science: File Handling

Explore reliable objective questions for File Handling tailored for Class 12 learners. Utilizing these Computer Science multiple-choice formats ensures thorough preparation and strengthens problem-solving speed for upcoming school assessments.

Practice File Handling MCQs for Class 12 Computer Science

View or download the dedicated File Handling MCQ resource below. Practicing these 50 objective questions regularly builds familiarity with standard exam patterns and helps secure higher marks in final Computer Science evaluations.

Question: Storage devices of a computer can be broadly classified into_______categories.

a) One

b) Two

c) Three

d) Four

Answer: Two

 

Question: _______storage is temporary.

a) Volatile

b) Non-volatile

c) Movable

d) Immovable

Answer: Volatile

 

Question: In_______storage values stored in variables are lost when a computer is shutdown.

a) Volatile

b) Non-volatile

c) Movable

d) Immovable

Answer: Volatile

 

Question: A Java program that stores a value in a________uses Random Access Memory (RAM).

a) Cell

b) Program

c) Variable

d) All of these

Answer: Variable

 

Question: Apart from variables, objects and their references are generally stored in______

a) ROM

b) PROM

c) RAM

d) Hard Disk

Answer: RAM

 

Question: Once the program terminates or the computer shuts down, the data is________from RAM.

a) Stored

b) Lost

c) Available

d) Accessible

Answer: Lost

 

Question: _______storage is permanent storage.

a) Volatile

b) Non-volatile

c) Movable

d) Immovable

Answer: Non-volatile

 

Question: Data is not_______when a computer loses power in a Non-volatile storage.

a) Stored

b) Lost

c) Available

d) Accessible

Answer: Lost

 

Question: When a Java program is saved on a disk, it is using______storage.

a) Temporary

b) Provisional

c) Conditional

d) Permanent

Answer: Permanent

 

Question: A computer_______is a collection of data stored on a non-volatile device.

a) File

b) Desktop

c) Directory

d) Device

Answer: File

 

Question: _______exist on permanent storage devices, such as hard disks, USB drives, optical disks and compact discs.

a) Files

b) Manuals

c) Directories

d) Devices

Answer: Files

 

Question: Data stored in files is often called_______data.

a) Text

b) Persistent

c) Informative

d) Binary

Answer: Persistent

 

Question: Files can be further classified broadly into_______categories.

a) One

b) Two

c) Three

d) Four

Answer: Two

 

Question: ______files contain data that can be read in a text editor.

a) Text

b) Manuscript

c) Memo

d) Binary

Answer: Text

 

Question: In the_______files the data has been encoded using a scheme such as ASCII or Unicode.

a) Text

b) Memo

c) Informative

d) Binary

Answer: Text

 

Question: ______files can be data files that contain facts, such as payroll file that contains employee numbers, names and salaries.

a) Binary

b) Memo

c) Program

d) Text

Answer: Text

 

Question: Some_______files can be program files or application files mat store software instructions.

a) Binary

b) Memo

c) Program

d) Text

Answer: Text

 

Question: are examples of editors through which text files can be created.

a) G edit

b) vi

c) pico

d) All of these

Answer: All of these

 

Question: The extensions of the files created through the above editor can have an extension like_________

a) Text

b) Java

c) C

d) All of these

Answer: All of these

 

Question: _____files contain data that has not been encoded as text.

a) Binary

b) Memo

c) Informative

d) Text

Answer: Binary

 

Question: The contents of a_______file are in binary format, which means the data is access terms of bytes.

a) Binary

b) Memo

c) Informative

d) Text

Answer: Binary

 

Question: The Binary files extensions examples are_______

a) Jpeg

b) Mp3

c) Class

d) All of these

Answer: All of these

 

Question: Java language supports various operations that can be performed on file or on_______

a) Programs

b) Attributes

c) Directories

d) Queries

Answer: Directories

 

Question: _______operations that can be performed on files using Java programs.

a) Determining the path of a file or a directory

b) Opening a file

c) Writing to a file

d) All of these

Answer: All of these

 

Question: _______operations that can be performed on files using Java programs.

a) Reading from a file

b) Closing or deleting a file

c) Querying the attributes of a file

d) All of these

Answer: All of these

 

Question: Java provides built-in_______that contains methods to help with the tasks related to file.

a) Variables

b) Packages

c) Classes

d) Devices

Answer: Classes

 

Question: The Java classes are present in package.

a) Java, bytes

b) Java.io

c) Java.util

d) Java.method

Answer: Java.io

 

Question: Java uses the concepts of______in file handling.

a) File systems

b) Streams

c) Packages

d) Classes

Answer: Streams

 

Question: Java provides_____different categories of java classes to perform I/O operations on bytes and characters.

a) One

b) Two

c) Three

d) Four

Answer: Two

 

Question: Which of the following is not a Binary file extension ?

a) Jpeg

b) Mp3

c) Class

d) txt

Answer: txt

 

Question: Which of the following is not a Text file extension ?

a) Txt

b) Java

c) Jpeg

d) C

Answer: Jpeg

 

Question: The_______class encapsulates information about the properties of a file or a directory.

a) Java.io.file

b) Java.oi.file

c) Java.util.io

d) Java.io.util

Answer: Java.io.file

 

Question: ________class can be used to access attributes of files and directions.

a) File

b) I/O

c) Java

d) util

Answer: File

 

Question: A programmer can do______a file or a directory.

a) Create

b) Rename

c) Delete

d) All of these

Answer: All of these

 

Question: The creation of a file Object that belongs to_____class does not imply that the file or directory exists.

a) File

b) I/O

c) Java

d) Util

Answer: File

 

Question: The______of a file can also be accessed like its permissions, length of a file or last modification time.

a) Features

b) Attributes

c) Qualities

d) Traits

Answer: Attributes

 

Question: A file________encapsulates a path name or reference to a physical file or a directory on the hard disk.

a) Method

b) Class

c) Object

d) Handler

Answer: Object

 

Question: There are nearly______that can be used to perform various operations on a file or a directory.

a) 25 methods

b) 30 methods

c) 35 methods

d) 20 methods

Answer: 30 methods

 

Question: _______does not provide any method to read from a file or write into a file.

a) File class

b) File method

c) File object

d) File operator

Answer: File class

 

Question: There are several_______classes to perform to read from a file or write into a file.

a) File

b) Stream

c) Package

d) Object

Answer: Stream

 

Question: By using the file class, one can create a______to any file by providing its absolute path in string format or by providing the relative path.

a) Location

b) Reference

c) Stream

d) Object

Answer: Reference

 

Question: The file class provides_______constructors to refer a file or a directory.

a) File (String path)

b) File (String directory_path, String file_name)

c) File (File directory, String file_name)

d) All of these

Answer: All of these

 

Question: In Linux, "password" file is present in_______directory stores the information of the users existing in the system.

a) "/etc"

b) “/pwd"

c) "/file"

d) “/dir"

Answer: "/etc"

 

Question: Suppose one wants to display its attributes, then its Java file object can be created using_______ways.

a) One

b) Two

c) Three

d) Four

Answer: Three

 

Question: _______method of file class returns true if the file or directory exists, otherwise returns false.

a) Boolean exists( )

b) Boolean is File()

c) Boolean is Directory( )

d) Boolean is Hidden( )

Answer: Boolean exists( )

 

Question: ______method of file class returns true if the file exists, otherwise returns false.

a) Boolean exists ( )

b) Boolean is File( )

c) Boolean is Directory( )

d) Boolean is Hidden( )

Answer: Boolean is File( )

 

Question: _____method of file class returns true if the directory exists, otherwise returns false.

a) Boolean exists( )

b) Boolean is File( )

c) Boolean is Directory( )

d) Boolean is Hidden( )

Answer: Boolean is Directory( )

 

Question: _______method of file class returns true if the file or directory is hidden.

a) Boolean exists ( )

b) Boolean is File( )

c) Boolean is Directory( )

d) Boolean is Hidden( )

Answer: Boolean is Hidden( )

 

Question: ______method of file class returns the absolute path of the file exists or directory.

a) String[ ] list( )

b) String get Path( )

c) String get Name( )

d) String get Absolute Path()

Answer: String get Absolute Path()

 

Question: ________method of file class returns the name of the file or directory referred by the object.

a) String[ ] list( )

b) String get Path( )

c) String get Name( )

d) String get Absolute Path()

Answer: String get Name( )

 

Question: _______method of file class returns the path to the file or directory.

a) String[ ] Hst( )

b) String get Path( )

c) String get Name( )

d) String get Absolute Path()

Answer: String get Path( )

 

Question: _______method of file class returns the name of the files and directories in a directory.

a) String[ ] list( )

b) String get Path( )

c) String get Name( )

d) String get Absolute Path()

Answer: String[ ] list( )

 

Question: _______method of file class returns the number of bytes in that file.

a) Long length( )

b) File[ ] list Files( )

c) Both (A) and (B)

d) None of these

Answer: Long length( )

 

Question: ________method of file class returns an array of abstract path names denoting the files in the directory.

a) Long length ( )

b) File[ ] list Files( )

c) Both (A) and (B)

d) None of these

Answer: File[ ] list Files( )

 

Question: ______method to list all the files present in a directory.

a) Display()

b) List( )

c) Dir()

d) Files()

Answer: List( )

 

Question: To modify a file or display the contents of a file, the concept of______has to be understood.

a) Files

b) Streams

c) Packages

d) Objects

Answer: Streams

 

Question: Java uses______classes to carry out read and write operations on files.

a) Files

b) Streams

c) Packages

d) Objects

Answer: Streams

 

Question: ______is an input device.

a) Monitor

b) Speaker

c) Keyboard

d) Plotter

Answer: Keyboard

 

Question: ______is an output device.

a) Monitor

b) Speaker

c) Keyboard

d) Plotter

Answer: Monitor

 

Question: ________can be classified as both input and output device as data can be stored and read from the files.

a) Monitor

b) Speaker

c) Keyboard

d) Hard disk

Answer: Hard disk

 

Question: _________are manufactured by various companies and come with different storage capacities like 500GB or 1 TB.

a) Monitor

b) Speaker

c) Keyboard

d) Hard disk

Answer: Hard disk

 

Question: ______can be connected using different cables like USB or SATA.

a) Hard disk

b) Scanner

c) Printer

d) Mouse

Answer: Hard disk

 

Question: A Java programmer does not need to worry about the technical details like type of______or its capacity while developing a program to perform read / write operations over the files

a) Hard disk

b) Scanner

c) Printer

d) Mouse

Answer: Hard disk

 

Question: The above point is possible because Java language provides functionality of______

a) Files

b) Streams

c) Directories

d) Objects

Answer: Streams

 

Question: A______is an abstract representation of an input or output device that is used as a source or destination for data.

a) File

b) Directory

c) Stream

d) Disk

Answer: Stream

 

Question: Visualize a______as a sequence of bytes that flows into the program or that flows out of the program.

a) File

b) Directory

c) Stream

d) Disk

Answer: Stream

 

Question: One can write data or read data using_______

a) Files

b) Streams

c) Directories

d) Objects

Answer: Streams

 

Question: When data is written to stream, the stream is called an________

a) Output stream

b) Input stream

c) I/O stream

d) Both (A) and (B)

Answer: Output stream

 

Question: The_______can transfer data from the program to a file on a hard disk or a monitor or to some other computer over the network.

a) Output stream

b) Input stream

c) I/O stream

d) Both (A) and (B)

Answer: Output stream

 

Question: An______is used to read data from an external device to the program.

a) Output stream

b) Input stream

c) I/O stream

d) Both (A) and (B)

Answer: Input stream

 

Question: _______can transfer data from keyboard or from the file on a hard disk to the program.

a) Output stream

b) Input stream

c) I/O stream

d) Both (A) and (B)

Answer: Input stream

 

Question: The main reason for using streams for input or output operations is to make our program independent of the_______involved.

a) Hard Disks

b) Keyboards

c) Printers

d) Devices

Answer: Devices

 

Question: _______is advantage of using streams.

a) Programmer does not need to worry about the technical details of the device.

b) The program can work for a variety of input/ output devices without any changes to the source code.

c) Both (A) and (B)

d) None of these

Answer: Both (A) and (B)

 

Question: To understand byte streams and character streams, one needs to differentiate between character and byte______

a) Representation

b) Collection

c) Numbers

d) Particulars

Answer: Representation

 

Question: If '5' is represented as a Character, its ASCII value will be______

a) 51

b) 52

c) 53

d) 54

Answer: 53

 

Question: If 5 is represented as a character, its binary representation will be_______

a) 53

b) 5

c) 101

d) 00110101

Answer: 00110101

 

Question: If '5' is represented as a binary number, then its value will be______

a) 53

b) 5

c) Five

d) 101

Answer: 5

 

Question: If '5* is represented as a binary number, then its binary representation will be_______

a) 00000101

b) 11001100

c) 10101100

d) 11111000

Answer: 00000101

 

Question: A character is generally stored using ASCII or Unicode format but when it is used for calculation purpose and then it's________value is meaningful.

a) Binary

b) Actual

c) Objective

d) Text

Answer: Binary

 

Question: In the statement int i = 32, the_____is true.

a) Declares 'i' as an integer type variable

b) That T stores number 32.

c) Both (A) and (B)

d) None of these

Answer: Both (A) and (B)

 

Question: The number 32 can be represented as two separate_______'3' and '2'.

a) Numbers

b) Values

c) Characters

d) All of these

Answer: Characters

 

Question: For numerical calculations, data types like int, float or double are used, that allows storing the numbers in_______format.

a) Actual

b) Text

c) Character

d) Binary

Answer: Binary

 

Question: Java supports two types of streams_______stream and______stream.

a) Byte

b) Character

c) Both (A) and (B)

d) None of these

Answer: Both (A) and (B)

 

Question: ______transfer data in the form of bytes to the file or devices are known as byte stream or binary stream.

a) Streams

b) Files

c) Data Flow

d) Commands

Answer: Streams

 

Question: The files that are created using______stream are known as binary files.

a) Byte

b) Character

c) Both (A) and (B)

d) None of these

Answer: Byte

 

Question: If variables are to be stores like integer, double or boolean into a file, then_______files should be used.

a) Byte

b) Text

c) Character

d) Binary

Answer: Binary

 

Question: ______files can also be used to store arrays or objects.

a) Byte

b) Text

c) Character

d) Binary

Answer: Binary

 

Question: Similarly text files and program codes are created using_______stream.

a) Byte

b) Character

c) Both (A) and (B)

d) None of these

Answer: Character

 

Question: Text files and program codes can be opened in text editors like vi and SciTE.

a) SciTE

b) vi

c) Both (A) & (B)

d) None of these

Answer: Both (A) & (B)

 

Question: Java provides_____set of classes, character stream class and binary stream class.

a) One

b) Two

c) Three

d) Four

Answer: Two

File Handling Objective Questions & Solutions for Class 12 Computer Science

Class 12 Computer Science File Handling Objective Test Questions

Test your conceptual understanding of File Handling with these targeted multiple-choice questions. Designed in alignment with the latest CBSE curriculum for Class 12 Computer Science, these problem sets build accuracy and prepare students for objective exams.

NCERT-Aligned Objective Questions and Solutions

Each question includes structured solution keys mapped directly to standard CBSE textbooks, helping students evaluate their reasoning and correct mistakes early in their revision.

Next Steps in Your Exam Preparation

Follow up your worksheet practice by attempting the interactive online Computer Science MCQ test for this chapter to evaluate your execution speed. All platform resources are free to access.

FAQs

Where can I access latest CBSE Class 12 Computer Science File Handling MCQs Set 01?

You can get most exhaustive CBSE Class 12 Computer Science File Handling MCQs Set 01 for free on StudiesToday.com. These MCQs for Class 12 Computer Science are updated for the 2026-27 academic session as per CBSE examination standards.

Are Assertion-Reasoning and Case-Study MCQs included in the Computer Science Class 12 material?

Yes, our CBSE Class 12 Computer Science File Handling MCQs Set 01 include the latest type of questions, such as Assertion-Reasoning and Case-based MCQs. 50% of the CBSE paper is now competency-based.

How do practicing Computer Science MCQs help in scoring full marks in Class 12 exams?

By solving our CBSE Class 12 Computer Science File Handling MCQs Set 01, Class 12 students can improve their accuracy and speed which is important as objective questions provide a chance to secure 100% marks in the Computer Science.

Do you provide answers and explanations for CBSE Class 12 Computer Science File Handling MCQs Set 01?

Yes, Computer Science MCQs for Class 12 have answer key and brief explanations to help students understand logic behind the correct option as its important for 2026 competency-focused CBSE exams.

Can I practice these Computer Science Class 12 MCQs online?

Yes, you can also access online interactive tests for CBSE Class 12 Computer Science File Handling MCQs Set 01 on StudiesToday.com as they provide instant answers and score to help you track your progress in Computer Science.