OA. free
Free
Qualcomm Digital Electronics Digital Electronics Medium

The elements of an array are stored successively in memory cells because:

Qualcomm technical mcq question, verified with a worked answer. Free to practise - no sign-up.

The elements of an array are stored successively in memory cells because:

Choose one option.
Show answer & explanation
Answer: D. By this way computer can keep track only the address of the first element and the addresses of other elements can be calculated.

Arrays are stored contiguously in memory because it allows efficient access: only the base address needs to be stored, and any element's address can be computed using the formula base_address + (index × element_size). This is the fundamental design principle, not a memory architecture limitation. Option D captures the correct reason without the false claim in B/C that memory architecture forbids non-contiguous storage (which is untrue—linked lists, heaps, and other data structures prove this).

Step-by-step Derivation:
Option A is too vague and incorrect. Option C claims a false architectural constraint—modern memory can store non-contiguous data; arrays are contiguous by design choice, not necessity. Option B combines D's correct reasoning with C's false claim, making it partially incorrect. Option D is precise: contiguous storage enables O(1) random access via address calculation (array[i] = base + i*sizeof(element)), which is why arrays are implemented this way.