By solving the Computer Class 12 GSEB Solutions and GSEB Class 12 Computer Question Paper March 2016 (For Science Stream) will be able to know the exam pattern in the exam.
GSEB Std 12 Computer Question Paper March 2016 (For Science Stream)
Question 1.
In Java, which method of file class returns true if file exists, otherwise returns false ?
(A) boolean FileDir( )
(B) boolean isFile( )
(C) boolean listFile( )
(D) boolean getFname( )
Answer:
(B) boolean isFile( )
Question 2.
Java supports which type of streams ?
(A) Byte stream
(B) Character stream
(C) Both (A) and (B)
(D) Binary Stream
Answer:
(C) Both (A) and (B)
Question 3.
In Java, which of the following is a subclass of Reader class ?
(A) InputstreamReader
(B) BufferedReader
(C) Outputstream
(D) Both (A) and (B)
Answer:
(D) Both (A) and (B)
Question 4.
In Java, which method of filewriter class is used to close the stream ?
(A) void close( )
(B) int break( )
(C) void terminate( )
(D) quit( )
Answer:
(A) void close( )
Question 5.
In Java, scanner class can be used to perform which of the following operations ?
(A) Read from the file
(B) Parse a string separated by delimeters
(C) Accept input from keyboard
(D) All of above
Answer:
(D) All of above
Question 6.
In Java, which of the following is used as a separator between fields of a record ?
(A) Space
(B) Variable
(C) Delimiter
(D) Path
Answer:
(C) Delimiter
Question 7.
In Java, which method of console class reads a single line of text from the console ?
(A) String Printline( )
(B) Char getLine( )
(C) Char Print( )
(D) String readLine( )
Answer:
(D) String readLine( )
Question 8.
In Java, read() method returns what to identify the end of data in the stream ?
(A) End
(B) -1
(C) 1
(D) 0
Answer:
(B) -1
Question 9.
Which of the following refers to a collection of data stored on a non-volatile device in a computer system ?
(A) File
(B) Volatile data
(C) Hard disk
(D) Application
Answer:
(B) Volatile data
Question 10.
Which of the following is a very popular LaTex distribution available in the standard ubuntu repositories ?
(A) f Tex
(B) d Tex
(C) Tex Live
(D) geteX Live
Answer:
(C) Tex Live
Question 11.
Which of the following file extension is used by LaTex ?
(A) .ext
(B) .tex
(C) .lat
(D) .ltx
Answer:
(B) .tex
Question 12.
We can compile the LaTex document by issuing which command at command prompt ?
(A) pdftax filename
(B) pdflat filename
(C) pdfext filename
(D) pdflatex filename
Answer:
(D) pdflatex filename
Question 13.
LaTex command starts with which character, followed by the command name ?
(A) –
(B) \
(C) $
(D) *
Answer:
(B) \
Question 14.
In LaTex document, if we want to insert a break in lines which command we will use at the end of each line except last line in paragraph ?
(A) .
(B) ;
(C) \\
(D) :
Answer:
(C) \\
Question 15.
Which of the following character is known as reserved character in LaTex ?
(A) #
(B) $
(C) %
(D) All of these
Answer:
(D) All of these
Question 16.
Which of the following website hosts the LaTex packages ?
(A) CTEN
(B) CTAN
(C) CWAN
(D) CLEN
Answer:
(B) CTAN
Question 17.
By default elements are assigned number upto which level that is upto subsections in LaTex ?
(A) Level 6
(B) Level 4
(C) Level 2
(D) Level 3
Answer:
(C) Level 2
Question 18.
If compilation was successful, you may select which menu option to view file in default document viewer in LaTex ?
(A) Tools → Run
(B) File → Run
(D) Edit → Compile → Go
(D) Tools → Go
Answer:
(D) Tools → Go
Question 19.
In LaTex packages like amsmath, amssymb and amsfonts is created by which of the following society ?
(A) Russian Mathematical Society
(B) Indian Mathematical Society
(C) European Mathematical Society
(D) American Mathematical Society
Answer:
(D) American Mathematical Society
Question 20.
Which of the following Mathematical symbol is used in LaTex ?
(A) <
(B) #
(C) =
(D) All of these
Answer:
(D) All of these
Question 21.
Which of the following operator is used to denote a subscript or an index in LaTex ?
(A) ≤ (less than equal to)
(B) ^ (caret)
(C) – (minus)
(D) _ (underscore)
Answer:
(D) _ (underscore)
Question 22.
Which of the following part of LaTex document contains the metadata ?
(A) Preface
(B) Preamble
(C) TOC
(D) Environment
Answer:
(B) Preamble
Question 23.
In LaTex, which of the following begins with \begin {name} and ends with \end {name} ?
(A) Group
(B) Environment
(C) Preamble
(D) Section
Answer:
(B) Environment
Question 24.
Which document class is used for creating presentation slides and it automatically sets larger font size in LaTex ?
(A) Impress
(B) Beamer
(C) Slides
(D) Article
Answer:
(C) Slides
Question 25.
In Java, at which level platform independence is possible due to bytecode interpreter ?
(A) Browser
(B) Source
(C) Machine
(D) Binary
Answer:
(D) Binary
Question 26.
In Java, the machine language for Java virtual machine is known as which code ?
(A) Java filecode
(B) Java bytecode
(C) Java intcode
(D) Java sourcecode
Answer:
(B) Java bytecode
Question 27.
To compile the java program we have to type what in frant of source file name ?
(A) javac filename.java
(B) javad filename
(C) java filename.html
(D) javas filename.java
Answer:
(A) javac filename.java
Question 28.
If Java program is compiled without any error we can execute it in SciTE editor by which menu ?
(A) Compile → Run → Go
(B) Edit → Go
(C) Tools → Go
(D) File → Go
Answer:
(C) Tools → Go
Question 29.
Java supports how many primitive data types ?
(A) 12
(B) 8
(C) 11
(D) 10
Answer:
(B) 8
Question 30.
What is the storage space for datatype float in Java ?
(A) 4 bytes
(B) 2 bytes
(C) 1 byte
(D) 8 bytes
Answer:
(A) 4 bytes
Question 31.
Real numbers in Java are compliant with which of the following ?
(A) IEE 36
(B) JEE 16
(C) IEEE 780
(D) IEEE 754
Answer:
(D) IEEE 754
Question 32.
In Java, variable name should begin with which of the following ?
(A) Alphabet
(B) Underscore ( _ )
(C) Dollar sign ($)
(D) All of these
Answer:
(D) All of these
Question 33.
In Java, a name used for constant value is known as what ?
(A) String return
(B) Literal
(C) Unicode Quote
(D) EBCDIC
Answer:
(B) Literal
Question 34.
Java 7 also supports binary numbers, using digits 0 and 1 but it should be prefix by which of the following ?
(A) 0b or 0B
(B) B
(C) B1
(D) B0
Answer:
(A) 0b or 0B
Question 35.
In Java, for type boolean there are precisely two literals, which are they ?
(A) Y and N
(B) 1 and 0
(C) True and False
(D) Yes and No
Answer:
(C) True and False
Question 36.
In Java, characters are stored by how many bit Unicode characters ?
(A) 36 – bit
(B) 4 – bit
(C) 8 – bit
(D) 16 – bit
Answer:
(D) 16 – bit
Question 37.
String literals in Java is a sequence of characters which can be enclosed in which of the following ?
(A) Dollar ($ $)
(B) Double quotes (“ ”)
(C) Back quotes (‘ ’)
(D) Single quotes (‘ ‘)
Answer:
(B) Double quotes (“ ”)
Question 38.
In Java, documentation comments begins and ends with which of the following ?
(A) /** and */
(B) /* and */
(C) /* and /
(D) //
Answer:
(A) /** and */
Question 39.
Arithmetic operators in Java, can be applied on which numeric data ?
(A) short
(B) float
(C) byte
(D) All of these
Answer:
(D) All of these
Question 40.
In Java, which of the following is known as unary operators for increment and decrement operator ?
(A) >= and < =
(B) + and –
(C) = = and ! =
(D) ++ and – –
Answer:
(D) ++ and – –
Question 41.
Which of the following is considered as comparison operator in Java ?
(A) =
(B) /
(C) %
(D) ! =
Answer:
(D) ! =
Question 42.
In Java, logical operators are also called which of the following operators if they operate on Boolean operands ?
(A) Assignment Operator
(B) Boolean Operator
(C) Increment Operator
(D) Relational Operator
Answer:
(B) Boolean Operator
Question 43.
In Java, conditional operator uses which two symbols in expression to delimit three operands ?
(A) ? and *
(B) . and :
(C) ? and :
(D) ; and ;
Answer:
(C) ? and :
Question 44.
In Java, a block statement is a group of statements enclosed between which pair of braces ?
(A) [/ /]
(B) { }
(C) ( )
(D) [ ]
Answer:
(B) { }
Question 45.
In Java, which of the following consist of attributes and methods ?
(A) Instance
(B) Variables
(C) Object
(D) Class
Answer:
(D) Class
Question 46.
Which keyword is used to create the object which allocates memory in Java ?
(A) new
(B) add
(C) ins
(D) create
Answer:
(A) new
Question 47.
In Java, what is called to initialize the newly created object ?
(A) Classes
(B) Reference variable
(C) Syntax variable
(D) Constructor
Answer:
(D) Constructor
Question 48.
All instances of class are allocated memory in data structure in Java and it is known as which of the following ?
(A) Directory
(B) File
(C) Heap
(D) Buffer
Answer:
(C) Heap
Question 49.
Instance variables and instance methods in Java are accessed via objects and they can be referred by using which operator ?
(A) Arithmetic operator (+)
(B) Dot operator (.)
(C) Assignment operator (=)
(D) Colon operator (:)
Answer:
(B) Dot operator (.)
Question 50.
Values of class variables are stored where in Java ?
(A) class
(B) file
(C) instance
(D) dir
Answer:
(A) class
Question 51.
In Java, variables defined inside methods or blocks are called which variables ?
(A) Global variable
(B) Instance variable
(C) Class variable
(D) Local variable
Answer:
(D) Local variable
Question 52.
In Java, different forms of methods with same name is known as which of the following ?
(A) Composition
(B) Polymorphism
(C) Mutators
(D) Inheritance
Answer:
(B) Polymorphism
Question 53.
Which access modifiers can be used before the type of variable or method in Java ?
(A) Public
(B) Protected
(C) Private
(D) All of these
Answer:
(D) All of these
Question 54.
By using which access modifier, allows access only to subclass or to share with the methods declared as “friend” in Java ?
(A) Package
(B) Protected
(C) Private
(D) Public
Answer:
(B) Protected
Question 55.
In Java, if we want protected data to be modified by others then which methods are to be written ?
(A) Accessor
(B) Getter
(C) Mutator
(D) Both (A) and (B)
Answer:
(C) Mutator
Question 56.
In Java, if we want to allow other methods to read only data value of our program we should use which method ?
(A) setter
(B) getter
(C) mutator
(D) Both (A) and (C)
Answer:
(B) getter
Question 57.
In Java, which of the following allows us to build new class with added capabilities by extending existing class ?
(A) Aggregation
(B) Polymorphism
(C) Composition
(D) Inheritance
Answer:
(D) Inheritance
Question 58.
Inheritance model consist of which type of relationship between two classes in Java ?
(A) 1 : M
(B) is – a
(C) 1 : 1
(D) has – a
Answer:
(B) is – a
Question 59.
In java, a sub class inherits all instance variables and methods from which class ?
(A) Derived class
(B) Instance class
(C) Super class
(D) Child class
Answer:
(C) Super class
Question 60.
Composition and aggregation establish which type of relationship between classes in java ?
(A) has – a
(B) is – a
(C) was – a
(D) as – a
Answer:
(A) has – a
Question 61.
In Java, ‘visibility modifiers’ ‘protected’ members are available as which members in the inherited subclass ?
(A) Object
(B) Public
(C) Instance
(D) Private
Answer:
(D) Private
Question 62.
In Java, while using inheritance – “Child class” can be referred to as which of the following ?
(A) Sub class
(B) Derived class
(C) Extended class
(D) All of these
Answer:
(D) All of these
Question 63.
Which of the following is the keyword used to refer a super class constructor in sub class constructor ?
(A) Name of subclass
(B) New
(C) Super
(D) Extends
Answer:
(C) Super
Question 64.
In Java, which variables are defined with in a class, outside any method with static keyword ?
(A) Global variable
(B) Class variable
(C) Instance variable
(D) Local variable
Answer:
(B) Class variable
Question 65.
In Java, arrays are useful to represent which type of data ?
(A) Vector
(B) Matrix
(C) Multi – dimensional
(D) All of these
Answer:
(D) All of these
Question 66.
In Java, what is used to represent 2-D data structure like table of rows and columns ?
(A) Scalar
(B) Vector
(C) Element
(D) Matrix
Answer:
(D) Matrix
Question 67.
In Java, to declare a 1 – D array we use a pair of which brackets after array name or after datatype ?
(A) < >
(B) [ ]
(C) { }
(D) ( )
Answer:
(B) [ ]
Question 68.
If ‘str’ is the object of string class and its content is “Hello” then what is the value of str. length ( ) ?
(A) error
(B) 8
(C) 5
(D) 7
Answer:
(C) 5
Question 69.
In Java, which of the following method can be used with java.util.Arrays class ?
(A) sort ( )
(B) fill ( )
(C) alert ( )
(D) Both (A) and (B)
Answer:
(D) Both (A) and (B)
Question 70.
In Java, to search an element in an array, Arrays class provides which method ?
(A) Binarysearch( )
(B) Stringsearch( )
(C) Elementsearch( )
(D) Linelndsearch( )
Answer:
(A) Binarysearch( )
Question 71.
In Java, 2-D array can be declared in which of the following correct way ?
(A) int marks ( ) ( ) = new int (5), (3);
(B) int marks [ ] ( ) = new int (5) (3);
(C) int marks = int [5], [3];
(D) int marks [ ] [ ] = new int [5] [3];
Answer:
(D) int marks [ ] [ ] = new int [5] [3];
Question 72.
Java supports two types of strings that are handled by which of the following class or classes ?
(A) String class
(B) StringBuffer class
(C) Both (A) and (B)
(D) String Constructor class
Answer:
(C) Both (A) and (B)
Question 73.
In Java, who creates a string object with its initial value using ary argument ?
(A) String (ary [object] [ ])
(B) String (char ary [ ])
(C) String (ary [ ], int len)
(D) String (ary ( ))
Answer:
(B) String (char ary [ ])
Question 74.
In Java, characters are stored using how many bytes ?
(A) 16 bytes
(B) 4 bytes
(C) 8 bytes
(D) 2 bytes
Answer:
(D) 2 bytes
Question 75.
Which are the methods provided by string class in Java ?
(A) To compare strings
(B) Find length of strings
(C) Combining strings
(D) All of above
Answer:
(D) All of above
Question 76.
In Java which string class method returns true if invoking string is same as str ?
(A) int equals (string boolean)
(B) boolean (Ignore case str)
(C) boolean equals (string str)
(D) boolean (string)
Answer:
(C) boolean equals (string str)
Question 77.
In Java, which string class method returns a string after appending str with the invoking string ?
(A) String combine (str)
(B) String concat (string str)
(C) String add (str)
(D) String join (str)
Answer:
(B) String concat (string str)
Question 78.
Java library also provides date class in which of the following package ?
(A) java.attr
(B) java.lang
(C) java.expr
(D) Java.util
Answer:
(D) Java.util
Question 79.
In Java, which method of date class constructs date object using current system time ?
(A) get Time ( )
(B) get Date ( )
(C) Date( )
(D) Date Time ( )
Answer:
(C) Date( )
Question 80.
In Java, which method of date class sets new date and time of an object using elapsed time ?
(A) Short getTime ( )
(B) Void SetTime (long elapsed time)
(C) Void SetDate (Date, Time)
(D) SetDate ()
Answer:
(B) Void SetTime (long elapsed time)
Question 81.
In Java, which constant of calendar class displays day of calendar month ?
(A) DATE
(B) DAY (date)
(C) month
(D) MONTH (date)
Answer:
(A) DATE
Question 82.
In Java, what are the values used for AM_PM constant of calendar class ?
(A) 1 for AM, 12 for PM
(B) 1 for AM, 0 for PM
(C) 1 for AM, 2 for PM
(D) 0 for AM, 1 for PM
Answer:
(D) 0 for AM, 1 for PM
Question 83.
In Java, which constant of calendar class displays Hour in 12 – hour notation ?
(A) H_M_S
(B) HOUR
(C) HOUR_MINUTE
(D) HOUR_OF_DAY
Answer:
(B) HOUR
Question 84.
In Java, by how many ways we can create an array object ?
(A) Null
(B) Three
(C) Two
(D) One
Answer:
(C) Two
Question 85.
In Java, an indication of a problem that occurs during a program’s execution, usually signals an error is known as which of the following ?
(A) Exception
(B) Aggregation
(C) Anomaly
(D) Deviation
Answer:
(A) Exception
Question 86.
In Java, errors can be broadly classified into which category ?
(A) Compile – time errors
(B) Arithmetic errors
(C) Run – time errors
(D) Both (A) and (C)
Answer:
(D) Both (A) and (C)
Question 87.
In Java, if there is a syntax error in the program we will get compilation error and will not be able to create which file ?
(A) .javac
(B) .code
(C) .obj
(D) .class
Answer:
(D) .class
Question 88.
While running java program in SciTE editor, which code indicates that the commands executed is successful ?
(A) Code “No errors”
(B) Code “0”
(C) Code “Zero error”
(D) Code “1”
Answer:
(B) Code “0”
Question 89.
Which of the following package in Java, contains a hierarchy of classes dealing with various exceptions ?
(A) java.lang
(B) java.io
(C) java.pac
(D) Both (A) and (B)
Answer:
(D) Both (A) and (B)
Question 90.
In Java, when an attempt is made to access the array element with an index value that is outside the range of array which exception class is used ?
(A) FileNotfoundException
(B) ArraylOException
(C) ArraylndexOutOfBoundsException
(D) NullArrayException
Answer:
(C) ArraylndexOutOfBoundsException
Question 91.
In Java, an object – oriented technique for managing errors is known as which of the following ?
(A) Error Definition
(B) Anomaly Handling
(C) Termination Handling
(D) Exception Handling
Answer:
(D) Exception Handling
Question 92.
In Java, try statement contains a block of statement written within which braces ?
(A) { }
(B) < >
C) [ ]
(D) ( )
Answer:
(A) { }
Question 93.
In Java, a catch block consists of keyword catch followed by how many parameter ?
(A) 1 (Single)
(B) 4
(C) 2
(D) 3
Answer:
(A) 1 (Single)
Question 94.
In Java program which block is generally used to clean up at the end of executing a try block ?
(A) Event
(B) Finally
(C) Catch
(D) Throws
Answer:
(B) Finally
Question 95.
In Java program, which block is widely used if a file needs to be closed or a critical resource is to be released at the completion of program ?
(A) Event
(B) Finally
(C) Catch
(D) Try
Answer:
(B) Finally
Question 96.
In Java program, when a throw statement is encountered a search for matching which block begins ?
(A) Event
(B) Finally
(C) Catch
(D) Try
Answer:
(B) Finally
Question 97.
Storage device of computer system can be broadly classified into which of the following category ?
(A) Volatile storage
(B) Non-volatile storage
(C) Dynamic storage
(D) Both (A) and (B)
Answer:
(D) Both (A) and (B)
Question 98.
File can exist on which of the following permanent storage device ?
(A) Hard disk
(B) Compact disc
(C) Optical disk
(D) All of these
Answer:
(D) All of these
Question 99.
Which of the following extension is used for binary files ?
(A) .jpeg
(B) .MP3
(C) .class
(D) All of these
Answer:
(D) All of these
Question 100.
In Java, which class encapsulates infomation about the properties of a file or a directory ?
(A) java.io.object.Fd
(B) java.lang.Dir
(C) java.util.Dir
(D) java.io.File
Answer:
(D) java.io.File