-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1.9Array_info.c
More file actions
26 lines (19 loc) · 1.19 KB
/
Copy path1.9Array_info.c
File metadata and controls
26 lines (19 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
int main(int argc, char const *argv[])
{
/*
ARRAY:-
Array are the collection of a finite number of homogenous data elements.
Elements of the array are referenced repectively by an index set of consisting of n consective numbers and are stored repectively in successive memory locations.
The numbers n of elements is called the length or size of the array.
To access an array element,address of an element is computed as an offset from the base address of the array and one mutliplication is needed to compute what is supposed to be added to base address to get memory address of the element.
assume we have 5 blocks of array and the first base address array block is 100 okey
now 100+sizeof(int)*3=106
The process takes one multiplication and the one addition.Since these two operations take constant time,we can say the array access can be performed in constant time....
*/
/*
1d Array=A list of data items that can be represented by one variables name using only one subscript and such variable is called one dimensional array.
2d Array=A list of data items can be conceptualize as rows and columns,which can be represented using one name and two subscripts..
*/
//by Navjot Singh Prince:)
return 0;
}