Elements of Array are stored successively in Memory Cells - Data Structure

Q.  Why the elements of an Array are stored successively in Memory Cells?
- Published on 26 Aug 15

a. by this way computer can keep track only the address of the first element and the addresses of the other elements can calculated
b. the architecture of computer memory does not allow arrays to store other than serially
c. Both of above
d. None of above

ANSWER: by this way computer can keep track only the address of the first element and the addresses of the other elements can calculated
 

    Discussion

  • Nirja Shah   -Posted on 21 Nov 15
    The elements of an Array are stored successively in Memory cells because computer can keep track only of the address of the first element and the addresses of the other elements can be calculated.
    void main()
    {
        int arr [ ]={10,20,40,80};
         cout << arr;
    }
    The above code will display the base address of array.

Post your comment / Share knowledge


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)