CBSE Class 12 Computer Science File Handling MCQs Set F

CBSE Class 12 Computer Science File Handling MCQs Set F 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 constructor File Output Stream (File file) throws_______

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

Answer: File Not Found Exception


Question: The following example will create an instance of________FileOutputStreamfosobject = new File Output Stream ("/home/Akash/myflle.txt");

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

Answer: File Output Stream


Question: The_______is a subclass of Input Stream and is generally used to read byte data from the files.

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

Answer: File Output Stream


Question: ______method of File lnput Stream class reads a byte of data from this input stream.

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

Answer: Int read( )


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

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

Answer: Void close( )


Question: ______method of FilelnputStream class reads up to b.length bytes of data from this input stream into an array of bytes.

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

Answer: Int read(byte[] b)


Question: A_______can get input from live interaction through keyboard / GUI or it may take input as command line arguments or from the files.

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

Answer: Program


Question: _______class belongs to the java.util package.

  • a) Printer
  • b) Console
  • c) Scanner
  • d) Keyboard

Answer: Keyboard


Question: It provides various methods to read input from the______or from the file.

  • a) Printer
  • b) Console
  • c) Scanner
  • d) Keyboard

Answer: Scanner


Question: A special feature of this class is that it breaks the input string into tokens (words) using a______

  • a) Delimiter
  • b) Printer
  • c) Console
  • d) White space

Answer: Delimiter


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


Question: _____is the default delimiter.

  • a) Delimiter
  • b) Printer
  • c) Console
  • d) White space

Answer: White space


Question: Each______can be of different type, for example a string like "India-1947" can also be read as "String-int" values.

  • a) Symbol
  • b) Token
  • c) Word
  • d) Mark

Answer: Token


Question: Which of the following is not a Scanner related constructor or method ?

  • a) Scanner (String str)
  • b) Scanner (Input Stream isobject)
  • c) Scanner (File fobject)
  • d) Scanner(Files i)

Answer: Scanner(Files i)


Question: A______object can be created from a string, file object or Input Stream object.

  • a) Printer
  • b) Console
  • c) Scanner
  • d) Keyboard

Answer: Scanner


Question: The method______of Scanner class closes the Scanner.

  • a) Void close ()
  • b) String next()
  • c) Boolean has Next()
  • d) int nextlnt()

Answer: Void close ()


Question: The method_____of Scanner class returns the next token.

  • a) Void close()
  • b) String next()
  • c) Boolean hasNext()
  • d) int nextlnt()

Answer: String next()


Question: The method______of Scanner class returns true if there is a token in input.

  • a) Void close()
  • b) String next()
  • c) Boolean has Next()
  • d) int nextlnt()

Answer: Boolean has Next()


Question: The method_______of Scanner class scans the next token of the input as Int.

  • a) Void close 0
  • b) String next()
  • c) Boolean has Next()
  • d) int nextlnt()

Answer: int nextlnt()


Question: The method______of Scanner class scans the next token of the input as Float.

  • a) Float next Float( )
  • b) String next()
  • c) Boolean has Next()
  • d) int nextlnt()

Answer: Float next Float( )


Question: The method_______of Scanner class scans the next token of the input as Line.

  • a) Float next Float( )
  • b) String next()
  • c) Boolean has Next()
  • d) String next Line( )

Answer: String next Line( )


Question: _______class can also be used to read from a file.

  • a) Printer
  • b) Console
  • c) Scanner
  • d) Keyboard

Answer: Scanner


Question: The_______class is especially used when the input is to be types in hidden form (characters must not be echoed on the screen).

  • a) Printer
  • b) Console
  • c) Scanner
  • d) Keyboard

Answer: Console


Question: The______class provides a method for reading password.

  • a) Printer
  • b) Console
  • c) Scanner
  • d) Keyboard

Answer: Console


Question: The Console class belongs to______package.

  • a) Java.io
  • b) Java.util
  • c) Java.class
  • d) Java.console

Answer: Java.io


Question: ________method of Console class is used to write a formatted string to this console's output stream using the specified format string and arguments.

  • a) String read Line( )
  • b) Char[ ] read Password()
  • c) Console printf(String format, Object args)
  • d) None of these

Answer: Console printf(String format, Object args)


Question: _______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) None of these

Answer: String readLine( )


Question: _______method of Console class reads a password or passphrase from the console with echoing disabled.

  • a) String read Line()
  • b) Char[ ] read Password()
  • c) Console printf(String format, Object args)
  • d) None of these

Answer: Char[ ] read Password()


Question: Scanner class is used for performing which of the following operations ?

  • a) Read from a file
  • b) Navigate through a file
  • c) Scan a file
  • d) All of these

Answer: Read from a file


Question: Which of the following is correct syntax ?

  • a) Public static void main (String args[ ])
  • b) Public static void main (String args)
  • c) Public static void main(String args[ ])
  • d) Public static void main(String args[ ]);

Answer: Public static void main(String args[ ])


Question: The_______class provides a method for reading password.

  • a) Printer
  • b) Console
  • c) Scanner
  • d) Keyboard

Answer: Console

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

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

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

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

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

×
Studies Today