DS
DS
Memory address of any element implies the particular location in the memory where
the element is stored.
if your question is about memory address of the array , memory address and base
address of an array are the same thing. But if you are asking the memory address of
an element of an array then we can calculate the memory address of the element with
the help of base address.
An array is homogeneous data structure, which means we can store similar type of
data on a particular array. when we talk in terms of an array , it always implies
every element occupies same amount of memory space in the array. Every array is
identified with the help of base address of the array . So basically base address
helps in identifying the address of all the elements of the array.
now coming back to memory address of an element, let us consider the element be in
the x location of the array.
A[x}= starting address of the array + (the number of elements prior to the element
x)*( size of each element)