answersLogoWhite

0


Best Answer

To implement array data structure, memory bytes must be reserved and the accessing functions must be coded. In case of linear arrays, the declaration statements tell how many cells are needed to store the array. The following characteristics of the array are used to calculate the number of cells needed and to find the location or address of any element of the array.

1. The upper bound (UB) of the index range.

2. The lower bound (LB) of the index range. In C/C++, LB is zero.

3. The location in memory of the first byte in the array, called base address of the array (Base)

4. The number of memory bytes needed for each cell containing one data element in the array (size, denoted by W)

By cell we mean a unit of memory bytes that will be assigned to hold a value of respective data element.

During the compilation of the program, the information about characteristics of the array is stored in a table called DOPE VECTOR. When compiler comes across references to an array element, it uses this information that will calculate the element's location in memory at runtime.

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How linear arrays represented in memory?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What are the two basic ways in representing linear structures in memory?

Data structures are classified as either linear or non linear, a data structure is said to be linear if its elements form a sequence, or, in other words, a linear list, there are two basic ways of representing such linear structures in memory, one way is to have the linear relationship between the elements represented by means of sequential memory locations, these linear structures are called arrays, the other way is to have the linear relationship between the elements represented by means of pointers or links, these linear structures are called linked lists.


How do you represented linked list in memory?

Memory Representation of Linear Linked List:Let LIST is linear linked list. It needs two linear arrays for memory representation. Let these linear arrays are INFO and LINK. INFO[K] contains the information part and LINK[K] contains the next pointer field of node K. A variable START is used to store the location of the beginning of the LIST and NULL is used as next pointer sentinel which indicates the end of LIST. It is shown below:


Is Array a linear data structure?

Conceptually, an array is a fixed size collection. However, a "ragged" array is not a linear one, nor a "matrix". Those 2 maybe thought of an array of arrays, ragged ones are arrays with different lengths, while matrices are arrays of the same length. Depends on the context of the question, an array is linear itself, regardless what kind of elements it contains. But there exists some arrays (I used math term on purposes) that are not "linear" (the ragged, the matrix, the 3-dimensional, 4-, etc.), thus, NOT all Arrays are Linear.


What is the limitation of the linear array?

The main limitations of linear arrays are 1. The prior knowledge of number of elements in the linear array is necessary 2. These are static structures. Static in the sense that memory is allocated at compilation time their memory used by them cannot be reduced or extended. 3. Since the elements of these arrays are stored in the these arrays are time consuming this is because of moving down or up to create a space of new element or to occupy the space vacated by the deleted element.


What is the linear data structures?

Linear data structures are 1-dimensional arrays, as in: vectors.


Is String a linear data structure?

yes it is, other linear data structures are lists,queues,stacks,arrays


What is the purpose of using arrays in C language?

The purpose of using arrays in C is to store multiple values in one variable. Then you can make programs that use arrays like lists, printing values from multiple arrays into one line. It take memory in continues block then we can know memory location easily. We can retrieve data quickly.


What is memory leakage in terms of arrays?

leakage in arrays occur when you declare an array with big size and using only very few bytes.


Do records fall under linear or non linear data structures?

A record is a compound data structure composed of heterogeneous fields. The memory layout of an individual record is linear insofar as the fields are allocated contiguously, however a group of records is not necessarily linear. It all depends upon how the records are linked together and that's ultimately defined by the data container. Generally speaking, arrays and lists are linear data structures while graphs and networks are non-linear.


How do you do linear functions?

By finding something who's behavior is represented by a linear function and graphing it.


What is linear data structure?

when elements are accesed or placed in contiguous memory location yhen data structure is known as linear data structure. stacks, arrays, queues and linklists are example of data structure. in non-linear data structure element are not placed in sequential manner. trees, graph are the ex. of non-linear data structure.


How do you find a linear function?

By finding something who's behavior is represented by a linear function and graphing it.