Questions · Page 7 of 7

MCQ

MCQ 3011 Mark
Which of the following is treated as an object of Array class in Java?
  • A
    Object
  • Array
  • C
    Method
  • D
    Class
Answer
Correct option: B.
Array
B
View full question & answer
MCQ 3021 Mark
Which type of sort will be performed, when we use only array as an argument?
  • A
    Partial array
  • B
    Even elements of array
  • C
    Only characters of array
  • Entire array
Answer
Correct option: D.
Entire array
D
View full question & answer
MCQ 3031 Mark
Which statement is used to change value of an array element, like variables ?
  • Assignment
  • B
    New
  • C
    Void
  • D
    Main( )
Answer
Correct option: A.
Assignment
A
View full question & answer
MCQ 3041 Mark
Which operator is not needed, when an array is initialized while creating ?
  • A
    Plus
  • B
    Void
  • New
  • D
    Static
Answer
Correct option: C.
New
C
View full question & answer
MCQ 3051 Mark
With which values array is initialized, as array is an object ?
  • A
    Class name
  • Default values
  • C
    Parameters of brackets
  • D
    Object name
Answer
Correct option: B.
Default values
B
View full question & answer
MCQ 3061 Mark
Which combination is not possible to specify simultaneously, while declaring an array ?
  • A
    Size of dimensions and square brackets
  • Size of dimensions and initial values
  • C
    Initial values and array variable
  • D
    Size of array and square brackets
Answer
Correct option: B.
Size of dimensions and initial values
B
View full question & answer
MCQ 3071 Mark
Which of the following are declared as static and can be referred without any object in the class?
  • A
    Object methods
  • B
    { }
  • C
    Index
  • Class methods
Answer
Correct option: D.
Class methods
D
View full question & answer
MCQ 3081 Mark
Which of the following contains reference to memory location where the array elements are stored ?
  • A
    Square brackets
  • B
    Datatype
  • C
    Memory location
  • Array name
Answer
Correct option: D.
Array name
D
View full question & answer
MCQ 3101 Mark
Which of the following contains reference to memory location where the array elements are stored?
  • A
    Object name
  • B
    Method name
  • Array name
  • D
    Data type
Answer
Correct option: C.
Array name
C
View full question & answer
MCQ 3111 Mark
Which of the following is a reference variable?
  • A
    Object name
  • B
    Variable
  • Array name
  • D
    Method name
Answer
Correct option: C.
Array name
C
View full question & answer
MCQ 3121 Mark
Which of the following specifies the position of an element in an array ?
  • A
    Array content
  • Index
  • C
    Reference variable
  • D
    Datatype
Answer
Correct option: B.
Index
B
View full question & answer
MCQ 3141 Mark
In Java how many bytes storage spaces are occupied by integer datatype ?
  • A
    10
  • B
    6
  • C
    2
  • 4
Answer
Correct option: D.
4
D
View full question & answer
MCQ 3151 Mark
Which of the following is/are proper example/s of an array ?
  • A
    int marks[ ] = new int[5];
  • B
    int[ ] marks = new int[5];
  • Both A & B
  • D
    marks[ ];
Answer
Correct option: C.
Both A & B
C
View full question & answer
MCQ 3161 Mark
Which is the proper syntax of declaring an array ?
  • A
    <data type><array name> [ ];
  • B
    <data type> [ ] <array name>;
  • Both A & B
  • D
    <array name>
Answer
Correct option: C.
Both A & B
C
View full question & answer
MCQ 3171 Mark
What can be declared in place of individual variables like marks1, marks2, marks3, marks 4, marks5?
  • marks [5]
  • B
    marks[0-5]
  • C
    marks[1-5]
  • D
    marks[0-4]
Answer
Correct option: A.
marks [5]
A
View full question & answer
MCQ 3181 Mark
Which of the following can be seen as a collection of one or more scalar variables?
  • A
    Matrix
  • Vector
  • C
    Data type
  • D
    Object
Answer
Correct option: B.
Vector
B
View full question & answer
MCQ 3201 Mark
Which of the following ways are used to create an array ?
  • A
    Using new operator and specifying size
  • B
    Directly initializing the content of array
  • Both A & B
  • D
    Declare an array object
Answer
Correct option: C.
Both A & B
C
View full question & answer
MCQ 3221 Mark
Which of the following is used to identify each element of Array variable ?
  • A
    Character
  • B
    Number
  • Index position
  • D
    String
Answer
Correct option: C.
Index position
C
View full question & answer
MCQ 3231 Mark
In which manner, all the elements of an array are stored in memory storage space ?
  • A
    Random
  • B
    Separated
  • Contiguous
  • D
    Any of A, B & C
Answer
Correct option: C.
Contiguous
C
View full question & answer
MCQ 3241 Mark
Which kind of information can be represented by 2 - D data structure ?
  • A
    Characters & Numbers
  • B
    Vectors
  • C
    Objects
  • Tables
Answer
Correct option: D.
Tables
D
View full question & answer
MCQ 3251 Mark
Which kind of information can be stored in 1- D?
  • A
    Characters
  • B
    Numbers
  • Both A & B
  • D
    Matrix
Answer
Correct option: C.
Both A & B
C
View full question & answer
MCQ 3261 Mark
Which of the following is a one dimensional data structure ?
  • A
    Matrix
  • Vector
  • C
    Class
  • D
    Method
Answer
Correct option: B.
Vector
B
View full question & answer
MCQ 3271 Mark
Which of the following are useful to represent vector, matrix and other multi- dimensional data?
  • A
    Vectors
  • Arrays
  • C
    Matrix
  • D
    Objects
Answer
Correct option: B.
Arrays
B
View full question & answer
MCQ 3281 Mark
Which of the following is a variable representing a collection of homogeneous type of elements ?
  • A
    Method
  • B
    Object
  • Array
  • D
    Class
Answer
Correct option: C.
Array
C
View full question & answer
MCQ 3291 Mark
What does 'length' refer to for an object of String class ?
  • A
    attribute
  • method
  • C
    class variable
  • D
    class name
Answer
Correct option: B.
method
B
View full question & answer
MCQ 3301 Mark
When an array sales [5] [12] is declared without specifying initial values, what is the initial value of sales [0] [0] ?
  • $0$
  • B
    default value
  • C
    compilation error
  • D
    60
Answer
Correct option: A.
$0$
A
View full question & answer
MCQ 3311 Mark
What will expression sales.length return for an array sales [5] [12] ?
  • A
    5
  • B
    12
  • 60
  • D
    120
Answer
Correct option: C.
60
C
View full question & answer