MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

DATA STRUCTURES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Complete this definition ____ An immutable data structure
A
is a data structure whose data cannot be changed once it has been created
B
is a data structure whose data can be changed once it has been created
C
is a data structure whose data cannot be read or accessed
D
is a data structure whose data is encrypted
Explanation: 

Detailed explanation-1: -Immutable data structures are ones that cannot be changed once they are created, meaning that the values inside them can’t be added, removed or changed. Instead of changing the data structure we make a new version of the data structure which is a separate value.

Detailed explanation-2: -Certain data types are immutable, which cannot be changed further after executing a program like an int, float, bool, string, Unicode, tuple.

Detailed explanation-3: -In object-oriented and functional programming, an immutable object (unchangeable object) is an object whose state cannot be modified after it is created. This is in contrast to a mutable object (changeable object), which can be modified after it is created.

Detailed explanation-4: -Immutable data types are those, whose values cannot be modified once they are created. Examples of immutable data types are int, str, bool, float, tuple, etc.

There is 1 question to complete.