CBSE Class 12 Computer Science File Handling MCQs Set B

CBSE Class 12 Computer Science File Handling MCQs Set B with answers available in Pdf for free download. The MCQ Questions for Class 12 Computer Science with answers have been prepared as per the latest syllabus, NCERT books and examination pattern suggested in Standard 12 by CBSE, NCERT and KVS. Multiple Choice Questions are an important part of exams for Grade 12 Computer Science and if practiced properly can help you to get higher marks. Refer to more Chapter-wise MCQs for NCERT Class 12 Computer Science and also download more latest study material for all subjects

File Handling Class 12 Computer Science MCQ

Class 12 Computer Science students should refer to the following multiple-choice questions with answers for File Handling in standard 12. These MCQ questions with answers for Grade 12 Computer Science will come in exams and help you to score good marks

File Handling MCQ Questions with Answers

 

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


More Questions.....................


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

Tags: 

 


Click for more Computer Science Study Material
Cascading Style Sheets and JavaScript
CBSE Class 12 Computer Science Cascading Style Sheets and JavaScript MCQs Set A
CBSE Class 12 Computer Science Cascading Style Sheets and JavaScript MCQs Set B
CBSE Class 12 Computer Science Cascading Style Sheets and JavaScript MCQs Set C
CBSE Class 12 Computer Science Cascading Style Sheets and JavaScript MCQs Set D
Classes and Objects In Java
CBSE Class 12 Computer Science Classes and Objects In Java MCQs Set B
CBSE Class 12 Computer Science Classes and Objects In Java MCQs Set C
CBSE Class 12 Computer Science Classes and Objects In Java MCQs Set D
CBSE Class 12 Computer Science Classes and Objects In Java MCQs Set A
Creating HTML Forms Using KompoZer
CBSE Class 12 Computer Science Creating HTML Forms Using KompoZer MCQs Set B
CBSE Class 12 Computer Science Creating HTML Forms Using KompoZer MCQs Set I
CBSE Class 12 Computer Science Creating HTML Forms Using KompoZer MCQs Set C
CBSE Class 12 Computer Science Creating HTML Forms Using KompoZer MCQs Set D
CBSE Class 12 Computer Science Creating HTML Forms Using KompoZer MCQs Set E
CBSE Class 12 Computer Science Creating HTML Forms Using KompoZer MCQs Set F
CBSE Class 12 Computer Science Creating HTML Forms Using KompoZer MCQs Set G
CBSE Class 12 Computer Science Creating HTML Forms Using KompoZer MCQs Set A
CBSE Class 12 Computer Science Creating HTML Forms Using KompoZer MCQs Set H
Designing Simple Website Using Kompozer
CBSE Class 12 Computer Science Designing Simple Website Using Kompozer MCQs Set C
CBSE Class 12 Computer Science Designing Simple Website Using Kompozer MCQs Set B
CBSE Class 12 Computer Science Designing Simple Website Using Kompozer MCQs Set D
CBSE Class 12 Computer Science Designing Simple Website Using Kompozer MCQs Set A
Exception Handling In Java
CBSE Class 12 Computer Science Exception Handling In Java MCQs Set D
CBSE Class 12 Computer Science Exception Handling In Java MCQs Set A
CBSE Class 12 Computer Science Exception Handling In Java MCQs Set B
CBSE Class 12 Computer Science Exception Handling In Java MCQs Set C
File Handling
CBSE Class 12 Computer Science File Handling MCQs Set F
CBSE Class 12 Computer Science File Handling MCQs Set A
CBSE Class 12 Computer Science File Handling MCQs Set B
CBSE Class 12 Computer Science File Handling MCQs Set C
CBSE Class 12 Computer Science File Handling MCQs Set D
CBSE Class 12 Computer Science File Handling MCQs Set E
File System
CBSE Class 12 Computer Science File System MCQs Set A
CBSE Class 12 Computer Science File System MCQs Set B
CBSE Class 12 Computer Science File System MCQs Set C
CBSE Class 12 Computer Science File System MCQs Set D
CBSE Class 12 Computer Science File System MCQs Set E
CBSE Class 12 Computer Science File System MCQs Set F
Introduction To E Commerce
CBSE Class 12 Computer Science Introduction To E Commerce MCQs Set E
CBSE Class 12 Computer Science Introduction To E Commerce MCQs Set A
CBSE Class 12 Computer Science Introduction To E Commerce MCQs Set B
CBSE Class 12 Computer Science Introduction To E Commerce MCQs Set C
CBSE Class 12 Computer Science Introduction To E Commerce MCQs Set D
Introduction To M Commerce
CBSE Class 12 Computer Science Introduction To M Commerce MCQs Set F
CBSE Class 12 Computer Science Introduction To M Commerce MCQs Set G
CBSE Class 12 Computer Science Introduction To M Commerce MCQs Set A
CBSE Class 12 Computer Science Introduction To M Commerce MCQs Set H
CBSE Class 12 Computer Science Introduction To M Commerce MCQs Set B
CBSE Class 12 Computer Science Introduction To M Commerce MCQs Set C
CBSE Class 12 Computer Science Introduction To M Commerce MCQs Set D
CBSE Class 12 Computer Science Introduction To M Commerce MCQs Set E
Java Basics
CBSE Class 12 Computer Science Java Basics MCQs Set A
CBSE Class 12 Computer Science Java Basics MCQs Set B
CBSE Class 12 Computer Science Java Basics MCQs Set F
CBSE Class 12 Computer Science Java Basics MCQs Set C
CBSE Class 12 Computer Science Java Basics MCQs Set G
CBSE Class 12 Computer Science Java Basics MCQs Set D
CBSE Class 12 Computer Science Java Basics MCQs Set E
Object Oriented Concepts
CBSE Class 12 Computer Science Object Oriented Concepts MCQs Set D
CBSE Class 12 Computer Science Object Oriented Concepts MCQs Set E
CBSE Class 12 Computer Science Object Oriented Concepts MCQs Set A
CBSE Class 12 Computer Science Object Oriented Concepts MCQs Set B
CBSE Class 12 Computer Science Object Oriented Concepts MCQs Set C
Publishing Documents Using Latex
CBSE Class 12 Computer Science Publishing Documents Using Latex MCQs Set A
CBSE Class 12 Computer Science Publishing Documents Using Latex MCQs Set D
CBSE Class 12 Computer Science Publishing Documents Using Latex MCQs Set B
CBSE Class 12 Computer Science Publishing Documents Using Latex MCQs Set E
CBSE Class 12 Computer Science Publishing Documents Using Latex MCQs Set C
CBSE Class 12 Computer Science Publishing Documents Using Latex MCQs Set F
CBSE Class 12 Computer Science Publishing Documents Using Latex MCQs Set G
CBSE Class 12 Computer Science Publishing Documents Using Latex MCQs Set H

Latest NCERT & CBSE News

Read the latest news and announcements from NCERT and CBSE below. Important updates relating to your studies which will help you to keep yourself updated with latest happenings in school level education. Keep yourself updated with all latest news and also read articles from teachers which will help you to improve your studies, increase motivation level and promote faster learning

How To Solve Unseen Passages In English

Unseen passages may contain one or many paragraphs. This is one of the important yet easy parts for a student to get marks. Students should thoroughly study and understand the passage to answer the related questions. The unseen passages are there just to test the...

CBSE Board Examination Scheme of Assessment 2021 2022

A. Academic session to be divided into 2 Terms with approximately 50% syllabus in each term: The syllabus for the Academic session 2021-22 will be divided into 2 terms by following a systematic approach by looking into the interconnectivity of concepts and topics by...

CBSE Class 10 Revised Syllabus

Last year CBSE had to reduce the syllabus because of the pandemic situation but it was not very effective because there were no examinations. This year to avoid any confusion and conflict, CBSE has decided to reduce the syllabus into term 1 and term 2. 50 percent of...

Moderation of Marks Class 11 and 12 Board Exams

The portal for moderation and finalization of results for Class-12 is being opened from 16.07.2021 to 22.07.2021. As Board has to declare the result latest by 31.07.2021, schools have been requested to follow the schedule strictly and complete the moderation within...

Score well in Class 12 English Boards Exam

12th Board exams are an important part of students' lives. The marks obtained in the board exam decide the college in which one can study. In class 12 the syllabus of each and every subject increases vastly and it is difficult to cover up every point. In English also...

MCQ Question based CBSE examination

For 2021-22 CBSE has launched MCQ question-based examination for Term 1 & Term 2 board examinations. The entire syllabus has been divided into two parts each including 50% of the entire syllabus. To score well, students must practice as per the new CBSE term-wise...

×
Studies Today