Hello friends in this article we are going to discuss about Basic of arrays Multiple Choice Questions | Objective type Questions | C or C++ Arrays Multiple choice Questions and answers | Java array multiple choice questions
You can check previous post : Data Structure |Basic Array Multiple Choice Questions and Answers
1.In arrays we store collection of ______data types.
- primitive
- non primitive
- both a and b
- none of these
Ans. 1
Explain : In arrays we can be used to store collection of primitive data types.
2.What is Disadvantage of array?
- Random access of elements using array index
- Easy access to all the elements
- Traversal through the array becomes easy using a single loop
- Allows a fixed number of elements to be entered which is decided at the time of declaration
Ans. 4
Explain : Allows a fixed number of elements to be entered which is decided at the time of declaration is Disadvantage of array
3.Array elements are accessed by using an ____index.
- Float
- Integer
- Char
- double
Ans. 2
Explain :Array elements are accessed by using an integer index.
4.Array index ends at which position?
- size of array
- size of array minus 1
- n
- size of array minus n
Ans. 2
Explain :Array index ends at size of array minus 1.
5.Array index ends at which position?
- size of array
- size of array minus 1
- n
- size of array minus n
Ans. 2
Explain :Array index ends at size of array minus 1.
6.Array contains object which is called as?
- primitive
- non primitive
- both a and b
- none of these
Ans. 2
Explain :.Array contains object which is called as non primitive.
7.One dimensional array can be declared as _____
- type var-name[]
- type[] var-name
- both a and b
- none of these
Ans. 3
Explain :One dimensional array can be declared as type var-name[],
type[] var-name
8.Default Array values are
- zero
- false
- null
- all of these
Ans. 4
Explain :zero (for numeric types), false (for boolean), or null (for reference types) are default array values.
9.In a situation where the size of the array and variables of the array are already known,______ can be used.
- Initial Value
- array literal
- array last value
- all of these
Ans. 2
Explain :In a situation where the size of the array and variables of the array are already known, array literals can be used.
10.We can Access Java Array Elements Using,
- while loop
- for loop
- break
- none of these
Ans. 2
Explain :We can Access Java Array Elements Using,for loop.