MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

DATA STRUCTURES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
What type of data structure is an array?
A
Static and mutable
B
Dynamic and immutable
C
Static and immutable
D
None of the above
Explanation: 

Detailed explanation-1: -A mutable structure allows data to be changed (such as deletion, insertion etc) 3. What type of data structure is an array? (Static/Dynamic?) (Mutable/immutable?) An array is static and mutable. It cannot change size but items can be added, edited moved or deleted.

Detailed explanation-2: -An array is a linear data structure that collects elements of the same data type and stores them in contiguous and adjacent memory locations.

Detailed explanation-3: -Static Data Structure : A static data structure is an organization or collection of data in memory which have a fixed size, that is, it can store a limited amount of elements or data in it. Array is an example of static data structure.

Detailed explanation-4: -The array is the popular and perfect example of static data structure while linked lists, trees, heaps, etc are examples of dynamic data structures.

Detailed explanation-5: -What is a Static Data structure? In Static data structure the size of the structure is fixed. The content of the data structure can be modified but without changing the memory space allocated to it.

There is 1 question to complete.