MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

DATA STRUCTURES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Once you’ve created an array, the size of the array can still change later in the code.
A
True
B
False
C
Either A or B
D
None of the above
Explanation: 

Detailed explanation-1: -If you create an array by initializing its values directly, the size will be the number of elements in it. Thus the size of the array is determined at the time of its creation or, initialization once it is done you cannot change the size of the array.

Detailed explanation-2: -You can’t change the size of the array after it’s constructed. However, you can change the number of elements in an ArrayList whenever you want.

Detailed explanation-3: -The values in an array can be any data type. Array values are immutable-they cannot be changed once they are created.

Detailed explanation-4: -Arrays are static so you won’t be able to change it’s size. You’ll need to create the linked list data structure.

Detailed explanation-5: -Answer: The size of the arrays is fixed-length and these must be a compile-time constant, During the course of the program’s execution, it cannot be altered. The size of an array is determined by how many elements are present when it is created by directly initializing its values.

There is 1 question to complete.