CBSE Class 12 Computer Science File Handling MCQs Set E

CBSE Class 12 Computer Science File Handling MCQs Set E 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: The Output Stream_______class extends Writer class.

  • a) Writer
  • b) Object
  • c) Reader
  • d) Character

Answer: Writer


Question: The_______converts stream of characters to a stream of bytes.

  • a) Input Stream
  • b) Output Stream
  • c) Reader Stream
  • d) Writer Stream

Answer: Output Stream


Question: The File Writer class extends______Writer and outputs characters to a file.

  • a) Input Stream
  • b) Output Stream
  • c) Reader Stream
  • d) Writer Stream

Answer: Output Stream


Question: The File Writer class has________constructor which throws IO Exception

  • a) File Writer (String file path)
  • b) File Writer (File file obj)
  • c) File Writer (String file path, Boolean append)
  • d) All of these

Answer: All of these


Question: Which of the following constructor is of File Writer Class ?

  • a) File Writer (String file path)
  • b) File Reader (File file obj)
  • c) File Writer constructor
  • d) All of these

Answer: File Writer (String file path)


Question: In the constructor "__________", if append is true, characters are appended to the end of file, otherwise the existing contents of the file are overwritten.

  • a) File Writer (String file path)
  • b) File Writer (File file obj)
  • c) File Writer (String file path, Boolean append)
  • d) None of these

Answer: File Writer (String file path, Boolean append)


Question: In the following example - an object of_______can be created. File Writerfwobject = new File Writer ("/Java/files/Charfilel.txt");

  • a) File Stream
  • b) File Writer
  • c) File Reader
  • d) File Demo

Answer: File Writer


Question: It is important to close the stream______after writing to a file is accomplished.

  • a) Object
  • b) Reader
  • c) File
  • d) Directory

Answer: Object


Question: _______files consume system resources and depending on the file mode.

  • a) Closed
  • b) Large
  • c) Small
  • d) Open

Answer: Open


Question: ________class is the base class for reading a character stream.

  • a) Object
  • b) Reader
  • c) File
  • d) Directory

Answer: Reader


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


Question: The abstract_______class defines the functionality that is available for all character input streams.

  • a) Object
  • b) Reader
  • c) File
  • d) Directory

Answer: Reader


Question: ______class should be used in program to perform read operations.

  • a) File Stream
  • b) File Writer
  • c) File Reader
  • d) File Demo

Answer: File Reader


Question: _________method of Reader class closes the stream.

  • a) Void close()
  • b) Int read()
  • c) Void read()
  • d) None of these

Answer: Void close()


Question: ________method of Reader class, reads next available character from the stream, it returns "-1" to indicate the end of stream.

  • a) Void close 0
  • b) Int read()
  • c) Void read()
  • d) None of these

Answer: Int read()


Question: The Input Stream Reader class extends______class.

  • a) Stream
  • b) Writer
  • c) Reader
  • d) Demo

Answer: Reader


Question: _______class converts a stream of bytes to a stream of characters.

  • a) Stream
  • b) Writer
  • c) Reader
  • d) Demo

Answer: Reader


Question: The_______class extends Input Stream Reader class and reads characters from a file.

  • a) File Stream
  • b) File Writer
  • c) File Reader
  • d) File Demo

Answer: File Reader


Question: Which of the following is a File Reader constructor ?

  • a) File Reader (String file path)
  • b) File Reader (File file obj)
  • c) Both (A) and (B)
  • d) None of these

Answer: Both (A) and (B)


Question: Which of the following is not a File Reader constructor ?

  • a) File Reader (String file path)
  • b) File Reader (File file obj)
  • c) Both (A) and (B)
  • d) File Reader(int i, int j)

Answer: File Reader(int i, int j)


Question: In the following example - an object of_______can be created. File Reader frobject = new File Reader ("/Java/flles/Charfflel.txt");

  • a) File Reader
  • b) File Writer
  • c) Both (A) and (B)
  • d) File Demo

Answer: File Reader


Question: While reading from a file,______must identify that the file has ended.

  • a) Program
  • b) Code
  • c) Class
  • d) Method

Answer: Program


Question: The Java_______method returns "-1" to identify the end of data in the stream.

  • a) Close()
  • b) Read()
  • c) Print()
  • d) Write()

Answer: Read()


Question: The______and_______classes in the java.io package, gives the ability to read and write from and into files in the disk.

  • a) File lnput Stream
  • b) File Output Stream
  • c) File Reader Stream
  • d) Both (A) and (B)

Answer: Both (A) and (B)


Question: The above mentioned streams are the sub classes of______and______classes.

  • a) Reader Stream
  • b) Input Stream
  • c) Output Stream
  • d) Both (B) and (C)

Answer: Both (B) and (C)


Question: The file_______is a subclass of Output Stream and is used to write bytes to the file or some output stream.

  • a) Reader Stream
  • b) Input Stream
  • c) Output Stream
  • d) Both (B) and (Q

Answer: Output Stream


Question: _______method of File Output Stream class closes the file output stream and releases any system resources associated with the stream.

  • a) Void write (int b)
  • b) Void close ()
  • c) Void write (byte [] b)
  • d) Void read()

Answer: Void close ()


Question: ________method of File Output Stream class writes the specified byte to this file output stream.

  • a) Void write (int b)
  • b) Void close ()
  • c) Void write (byte [] b)
  • d) Voidread()

Answer: Void write (int b)


Question: ______method of File Output Stream class writes b.length bytes from the specified byte array to this file output stream.

  • a) Void write(int b)
  • b) Void close()
  • c) Void write (byte [] b)
  • d) Voidread()

Answer: Void write (byte [] b)


Question: The constructors of_______can accept either a string containing the path to the file location or an object of the file class.

  • a) File Output Stream
  • b) File lnput Stream
  • c) File Reader Stream
  • d) File Constructor

Answer: File Output Stream


Question: The constructor File Output Stream (String name) throws________

  • a) File Out of Bounds Exception
  • b) File Not Found Exception
  • c) File Found Exception
  • d) None of these

Answer: File Not Found Exception

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 C
CBSE Class 12 Computer Science Cascading Style Sheets and JavaScript MCQs Set D
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
Classes and Objects In Java
CBSE Class 12 Computer Science Classes and Objects In Java MCQs Set A
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
Creating HTML Forms Using KompoZer
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
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
Designing Simple Website Using Kompozer
CBSE Class 12 Computer Science Designing Simple Website Using Kompozer MCQs Set A
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
Exception Handling In Java
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
CBSE Class 12 Computer Science Exception Handling In Java MCQs Set D
File Handling
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
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
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 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
CBSE Class 12 Computer Science Introduction To E Commerce MCQs Set E
CBSE Class 12 Computer Science Introduction To E Commerce MCQs Set A
Introduction To M Commerce
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
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
Java Basics
CBSE Class 12 Computer Science Java Basics MCQs Set E
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
Object Oriented Concepts
CBSE Class 12 Computer Science Object Oriented Concepts MCQs Set B
CBSE Class 12 Computer Science Object Oriented Concepts MCQs Set C
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
Publishing Documents Using Latex
CBSE Class 12 Computer Science Publishing Documents Using Latex MCQs Set H
CBSE Class 12 Computer Science Publishing Documents Using Latex MCQs Set D
CBSE Class 12 Computer Science Publishing Documents Using Latex MCQs Set E
CBSE Class 12 Computer Science Publishing Documents Using Latex MCQs Set A
CBSE Class 12 Computer Science Publishing Documents Using Latex MCQs Set F
CBSE Class 12 Computer Science Publishing Documents Using Latex MCQs Set B
CBSE Class 12 Computer Science Publishing Documents Using Latex MCQs Set G
CBSE Class 12 Computer Science Publishing Documents Using Latex MCQs Set C

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

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...

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 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...

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...

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...

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