Elements of an array are stored _______ in memory.

Skill/Topic: Array
A) Periodical
B) Sequentially
C) Parallely
D) None of the above
Explanation: Elements of an array are stored sequentially in memory. For example,First, create an array called letters and assign characters to it, as shown here: char letters[3];letters[0] = 'C';letters[1] = 'B';letters[2] = 'A';In this, each letter appears one after the other in memory. This is because these values are assigned to elements of an array, and each array element is placed sequentially in memory

Showing Answers 1 - 5 of 5 Answers

samiksc

  • Jan 19th, 2006
 

not necessarily in consecutive memory. For a large array compiler may choose different locations for 2 or more parts of an array. However the compiler will see to it that you get appropriate element by using index and it takes you to appropriate address when you use pointer arithmetic. But you cannot guarantee that the entire array is stored in consecutive locations.

  Was this answer useful?  Yes

bahwesh

  • Feb 21st, 2006
 

basically elements are stored in contineous memory lacations,

but as per need we can also store them in chunks of memory. by making use of link list. various other techniques can also be used

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions