COMPILER DESIGN

ADVANCED TOPICS IN COMPILER DESIGN

CODE GENERATION FOR OBJECT ORIENTED LANGUAGES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
An array elements can be accessed in ____ order.
A
Sequential
B
Random
C
In Sequential and Random Both
D
Cannot Access
Explanation: 

Detailed explanation-1: -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-2: -Of course, in arrays sequential access is also possible, and so is random access. Since you appear to be quoting information from somewhere else, you should add a link to the source of that information. An array or vector has a inherent order.

Detailed explanation-3: -To access any element in the list we need to cross all the elements before it sequentially and so the elements are only sequentially accessible. But in arrays, we can directly access any of its indexes-randomly accessible.

There is 1 question to complete.