# 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 A 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 2021 syllabus, NCERT books and examination pattern suggested in Standard 12 by CBSE, NCERT and KVS. Multiple Choice Questions for 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

#### Question: An_______is a variable representing a collection of homogeneous type of elements.

• a) Arrangement
• b) Array
• c) Assortment
• d) Group

#### Question: ________are useful to represent vector, matrix and other multi-dimensional data.

• a) Arrangements
• b) Arrays
• c) Assortments
• d) Groups

• a) Vector
• b) Path
• c) Matrix
• d) Route

• a) Vector
• b) Path
• c) Matrix
• d) Route

#### Question: ________are useful when same operations are to be performed on various elements of the similar type.

• a) Matrix's
• b) Arrays
• c) Dimensions
• d) Groups

• a) Index's
• b) Values
• c) Features
• d) Elements

• a) Index
• b) Value
• c) Tabular
• d) Element

• a) Array
• b) Variable
• c) Matrix
• d) Element

• a) One
• b) Two
• c) Three
• d) Four

• a) One
• b) Two
• c) Three
• d) Four

#### Question: Which is the way an array object can be created ?

• a) Using new operator and specifying the size.
• b) Directly initializing the content of array
• c) Both (A) and (B)
• d) None of these

#### Question: Array with______dimension is known as 1-D array.

• a) Double
• b) Triple
• c) Both (A) and (B)
• d) Single

• a) Vector
• b) Path
• c) Matrix
• d) Variable

#### Question: Instead of declaring individual variables like marks 1, marks2, marks3, marks4, marks5; one can declare array_________

• a) Marks 
• b) Mark
• c) Marks[l-5]
• d) All of these

#### Question: Individual variable elements of an array marks  can be accessed as :

• a) Marks, marks, marks, marks, marks .
• b) Marks[-1], marks, marks, marks, marks .
• c) Marks, marks, marks, marks, marks .
• d) Marks[-1], marks, marks, marks, marks .

Answer: Marks, marks, marks, marks, marks .

• a) 2-D
• b) 1-D
• c) 3-D
• d) 4-D

#### Question: The syntax to declare array is as follows________A) [ ]; (B) ; (C) both (A) and (B) (D) none of these

• a)[ ];
• b);
• c) Both (A) and (B)
• d) None of these

• a) Five
• b) Six
• c) Four
• d) Seven

• a) Chip
• b) Memory
• c) Variable

#### Question: Array object named 'marks' with size for 5 elements can be created as follows :

• a) Int marks [ ] = new int ;
• b) Int[ ] marks = new int ;
• c) Both (A) and (B)
• d) None of these

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

• a) 2
• b) 3
• c) 4
• d) 5

#### Question: Thus array marks requires________bytes in contiguous locations in memory.

• a) 5 x 4 = 20
• b) 5 x 5 = 25
• c) 5 x 3 = 15
• d) 5 x 2 = 10

Answer: 5 x 4 = 20

#### Question: To refer an element of an array, an index or subscript is used in______after array variable name.

• a) Curly bracket { }
• b) Square bracket [ ]
• c) Round bracket ()
• d) None of these

#### Question: ______specifies the position of an element in an array.

• a) Number
• b) Index
• c) Variable name
• d) Element

• a) 5
• b) 4
• c) 1
• d) 0

• a) 1 to 5
• b) 0 to 4
• c) 0 to 5
• d) 1 to 4

#### Question: In array variable marks , marks  refers to the_______element.

• a) Last
• b) Second
• c) First
• d) None of these

• a) Last
• b) Second
• c) First
• d) Fourth

• a) Position
• b) Location
• d) Reference

• a) Position
• b) Location
• d) Reference

• a) Position
• b) Location
• d) Reference

• a) Default
• b) Initial
• c) Declared
• d) Index

#### Question: 1-D array is initialized using_______separated values of data elements in braces { }.

• a) Semi colon
• b) Comma
• c) Colon
• d) Full stop

#### Question: Which of the following is correct initialization of 1-D array ?

• a) Int marks[ ] = {90, 70, 77};
• b) Int [ ] marks = {90, 70, 77};
• c) Int marks} ] = {90; 70; 77}
• d) Both (A) and (B)

• a) New
• b) New
• c) Int
• d) Float

#### Question: The array size is same as the number of values specified in________

• a) Braces
• b) Index
• c) Default value
• d) Initialization

• a) Private
• b) Void
• c) Package
• d) Static

• a) Index
• b) Value
• c) Tabular
• d) Element

#### Question: Like variables, to change the value of an element, an assignment statement can be used which refers a variable element on______side.

• a) Right
• b) Left
• c) Middle
• d) None of these

#### Question: Instead of writing the code, various static methods provided by Java using_______class can be used.

• a) Java.Arrays
• b) Java.utility
• c) Java.util.Arrays
• d) All of these

#### Question: Methods sort() and fill() are part of______class.

• a) JavaArrays
• b) Java.util
• c) Java.util.Arrays
• d) All of these

• a) Sort()
• b) Fill()
• c) Display()
• d) Order()

• a) Sort()
• b) Fill()
• c) Display()
• d) Order()

#### Question: To search an element in an array, arrays class provides______method.

• a) Search0
• b) Find()
• c) Binary search()
• d) Bin search ()

#### Question: search method does element by element comparison in a serial manner.

• a) Linear
• b) Vertical
• c) Horizontal
• d) Vector

• a) 2-D
• b) 1-D
• c) 3-D
• d) 4-D

#### Question: In Java, 2-D array can be declared using array name and 2 pairs of______to specify the size of two dimensions row and column respectively.

• a) Curly bracket { } { }
• b) Square bracket [ ] [ ]
• c) Round bracket () ( )
• d) None of these

Answer: Square bracket [ ] [ ]

#### Question: int marks [ ] f ] = new int  , the logical view of array elements is a table of_________

• a) 3 rows and 5 columns
• b) 15 columns
• c) 5 rows and 3 columns
• d) 15 rows

Answer: 5 rows and 3 columns

• a) 15
• b) 45
• c) 60
• d) 8

• a) 2-D
• b) 1-D
• c) 3-D
• d) 4-D

#### Question: Declaration and initialization of 2-D array is very similar to 1-D array except the number of

• a) Sizes
• b) Length
• c) Index values
• d) Dimensions

• a) 2-D
• b) 1-D
• c) 3-D
• d) 4-D

#### Question: To initialize 2-D array, all these initialized rows are to be enclosed in curly braces {} separating them by______

• a) Colon (:)
• b) Comma (,)
• c) Semi Colon (;)
• d) Full stop (.)

• a) Matrix
• b) Array
• c) Dimension
• d) Group

#### Question: In 2-D array, each name is stored in different row and all names have different number of______

• a) Spaces
• b) Groups
• c) Characters
• d) Columns

• a) Length
• b) Height
• c) len
• d) Size

• a) Length
• b) Height
• c) len
• d) Size

• a) Length
• b) Height
• c) Len
• d) Size

• a) Matrix
• b) Array
• c) Dimension
• d) Group

• a) Matrix
• b) Array
• c) Dimension
• d) Group

• a) One
• b) Two
• c) Zero
• d) Three

• a) Matrix
• b) Array
• c) Dimension
• d) Group

#### Question: String is nothing but a sequence of________

• a) Spaces
• b) Groups
• c) Characters
• d) Columns

#### Question: 1-D array of_______can be considered as a string.

• a) Spaces
• b) Groups
• c) Characters
• d) Columns

#### Question: ________literals are where a sequence of characters is enclosed between double quotes.

• a) String
• b) Character
• c) Numerical
• d) None of these

• a) One
• b) Two
• c) Three
• d) Four

#### Question: Strings in Java are handled by two classes namely 'String' and________

• a) Strings
• b) Characters
• c) Buffer
• d) StringBuffer

• a) String
• b) Character
• c) Buffer
• d) Code

• a) Value
• b) Argument
• c) Index
• d) [ ]

• a) Length
• b) Leng
• c) Len
• d) Limited

#### Question: String (String strObj) creates a String object which is same as object specified in________

• a) Value
• b) Argument
• c) Index
• d) Square brackets [ ]

• a) Literal
• b) obj
• c) Object
• d) Variable

• a) Literal
• b) Obj
• c) Object
• d) Variable

• a) Four
• b) Three
• c) Two
• d) Five

• a) ASCII
• b) Coded
• c) ACSII
• d) ACIIS

#### Question: A______can be used with array of bytes as an argument.

• a) Method
• b) Destructor
• c) Variable
• d) Constructor

#### Question: When two String objects are created using same string literals, memory space is not allocated for______object.

• a) First
• b) Second
• c) Both (A) and (B)
• d) None of these

• a) New
• b) new
• c) int
• d) Float

• a) Equals
• b) Matches
• c) Compares
• d) Relates

#### Question: The String class provides_______to compare strings, find length of string, combining strings, obtaining substrings, converting strings, splitting strings, searching for character or patterns in string etc.

• a) Constructors
• b) Methods
• c) Strings
• d) Classes

#### Question: Method Boolean equals(String str) returns_______if invoking string is same as str.

• a) True
• b) False
• c) Can't say
• d) None of these

#### Question: Method booleanequalslgnore Case (String str) returns_______if invoking string is same as str after ignoring case (case insensitive).

• a) True
• b) False
• c) Can't say
• d) None of these

#### Question: Method int compare To (String str) returns 0, > 0, < 0_______if invoking string is equal to, greater than or less than str respectively.

• a) String
• b) Negative value
• c) Integer
• d) Float

#### Question: Method int compare To ignore Case (String str) is same as______but Case Sensitive.

• a) Equals
• b) Ignore Case
• c) Equals lgnore Case
• d) Compare To

#### Question: A String class provides methods for_______task.

• a) Extracting part of string.
• b) Replacing characters or substrings.
• c) Splitting string into substrings
• d) All of these

#### Question: A String class provides methods for______task.

• a) Getting number of characters.
• b) Getting character at specified index position.
• c) Converting string into an array of bytes.
• d) All of these

#### Question: A String class provides methods for_____task.

• a) Converting string into lowercase or uppercase
• b) Appending string
• c) Copy string or part of string
• d) All of these

#### Question: Method int______returns number of characters in invoking string.

• a) IndexAt(int index)
• b) Length( )
• c) GetBytes()
• d) To Upper Case()

#### Question: Method char______returns character at index position from the invoking string, index considered from 0.

• a) Index At(int index)
• b) Length( )
• c) Get Bytes()
• d) To Upper Case()

#### Question: Method byte[ ]_______returns an array of characters as bytes from invoking string.

• a) IndexAt(int index)
• b) Length( )
• c) Get Bytes()
• d) To Upper Case()

## Tags:

Click for more Computer Science Study Material

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

This has a reference to the letter no CBSE/COORD/2021 dated 11.02.2021 regarding conduct of the School-Based Assessment (Internal Assessment/Practical/ Project) of Class-XII and uploading the marks by 11.06.2021. It has been observed that some schools have not been...

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

### FAQs on Policy for Tabulation of Marks for Class 10 Board Exams

ON POLICY Question.1 How CBSE will declare the result of Class-X? Answer. Results of Class X Board will be declared on the basis of an objective criterion developed by the Board vide Notification no.CBSE/CE/2021 dated 01.05.2021. Question.2. If any candidate is not...

### CBSE Class 12 Evaluation Criteria 2021

SUMMARY OF THE POLICY FOR TABULATION OF MARKS FOR CLASS XII BOARD EXAMINATIONS 2021   1(a) Due to cancellation of the Board examinations, the assessment of theory portion of 80/70/60/50/30 marks will be done by the school based on the following:     Class...

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

×