Tuesday, January 12, 2010

II. Each Question Carries 2 Mark.
1) To bring information a program opens a ___________ on an information source such as a file, memory, a socket and reads data serially.
a) File Writer b) file reader c) Stream d) None

2) Stream classes are divided into character streams, bytes streams which are going to use Read and write data with the help of appropriate methods.
a) False b) True

3) Which of the following are the predefined streams
i) System.in
ii) System.out
iii)System.err
a) only i b) only i, ii c) All d) None

4) There are three predefined streams already open and ready to use in every program. These streams are declared in ____________ package.
a) java.io b) java.lang.System c) both d) None

5) Reader Provides the API and partial implementation for readers streams that read _____ bit character, and writer provides API writer streams to write ---------bit character.
a) 16, 32 b) 32, 32 c) 16, 16 d) None

6) InputStream, Outputstream are derived from bytes stream, they are typically used to read and write __________data such as images and sounds.
a) text data b) binary data c) both d) None

7) This stream aleary open and ready to supply input data. Typically this stream corresponds to key board inut
a) System.in b) System.out c) System.err d) None

8) This stream aleary open and ready to accept output data. Typically this stream corresponds to display output data
a) System.in b) System.out c) System.err d) Both b, c

9) A fileinputstream can be created with FileInputStream( String ) constructor. The Argument should be the name of the -----------. After you create a file input stream, you can read bytes from the stream by calling its ______method.
a) read, file b) file, read c) read, read d) None

10) You can create a file output stream that appends data after the end of an existing file with the ileOutputStream(String,Boolean) constructor. The strng specifies name of the file and and the Boolean argument should equal true to append data.
a) False b) True


II. Answer – 2 Mark.


1.C 2. B 3. C 4. B 5. C 6. B 7. A
8.D 9. B 10. B