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
Answer: Option A
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
Answer: Option A
What is the time complexity of accessing an element in an array by index?
A. O(n)
B. O(1)
C. O(log n)
D. O(n log n)
Which of the following is the correct way to declare an array in C?
A. int array[];
B. array{int};
C. int array[10];
D. int array();
How do you find the length of an array in Java?
A. array.size();
B. array.length;
C. array.length();
D. array.size;
Join The Discussion