COMPUTER SCIENCE AND ENGINEERING
DATA STRUCTURES
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
randomly
|
|
Sequentially
|
|
Exponentially
|
|
Logarithmically
|
Detailed explanation-1: -Explanation: Elements in an array are accessed randomly. In Linked lists, elements are accessed sequentially.
Detailed explanation-2: -Elements of an array are accessed by specifying the index ( offset ) of the desired element within square [ ] brackets after the array name. Array subscripts must be of integer type.
Detailed explanation-3: -Expert-Verified Answer The given statement is False. Elements stored in an array can be accessed both sequentially and randomly. * An array is a contiguous collection of elements that can be accessed randomly by the means of their index value. * This is known as random access of the array elements using an index.
Detailed explanation-4: -An array elements are always stored in sequential memory locations. Hence, the correct answer is option (A)
Detailed explanation-5: -Random access (more precisely and more generally called direct access) is the ability to access an arbitrary element of a sequence in equal time or any datum from a population of addressable elements roughly as easily and efficiently as any other, no matter how many elements may be in the set.