Data Structure Questions and Answers-Dynamic Array

 

 Help authour, Buy PDF Ebook   >>>Click Here<<<

Data Structure Questions and Answers-Dynamic Array

Question 1
What is a dynamic array?
A
A variable size data structure
B
An array which is created at runtime
C
The memory to the array is allocated at runtime
D
An array which is reallocated everytime whenever new elements have to be added
Geography Questions answers
Question 1 Explanation: 
It is a varying-size list data structure that allows items to be added or removed, it may use a fixed sized array at the back end.

Question 2
What is meant by physical size in a dynamic array?
A
The size allocated to elements
B
The size extended to add new elements
C
The size of the underlying array at the back-end
D
The size visible to users
EVS Questions answers
Question 2 Explanation: 
Physical size, also called array capacity is the size of the underlying array, which is the maximum size without relocation of data.

Question 3
The number of items used by the dynamic array contents is its .....
A
Physical size
B
Capacity
C
Logical size
D
Random size
English literature Questions answers
Question 3 Explanation: 
None.

Question 4
How will you implement dynamic arrays in Java?
A
Set
B
Map
C
HashMap
D
List
Civics Test Questions answers
Question 4 Explanation: 
ArrayList is used to implement dynamic arrays in Java.

Question 5
Which of the following is the correct syntax to declare an ArrayList in Java?
A
ArrayList al = new ArrayList();
B
ArrayList al = new ArrayList[];
C
ArrayList al() = new ArrayList();
D
ArrayList al[] = new ArrayList[];
ICT Questions answers
Question 5 Explanation: 
This is a non-generic way of creating an ArrayList.

There are 5 questions to complete.

 

 Help authour, Buy PDF Ebook   >>>Click Here<<<