We can access elements of an array randomly, but the memory allocation is sequential. let's understand it with an example: #include<iostream> using namespace std; int main(){ //declare an array. int arr[5]={1,2,3,4,5}; //accessing randomly court<<arr[0]<<" "<<arr[2]; return 0; } //OUTPUT 1 3
In array, we have contiguous memory which means we can access the elements by adding the value to the base address. It's known as index based accessing. That's why we don't need to traverse the array to access a particular element. We can access it using its index in the array. Hence, we can access elements of array randomly.
ANS:->Sequentially->as elements in array are stored in contigous memory.
5:55 b)sequentially
2: sequenceally
Array can be access SEQUENTIALLY because this data structure fall into linear data structure that means we can acess 'SEQUENTIALLY'.
I know java core and little bit about JEE can i also take this course or other course Regarding DSA
Sequentially because the . Memory allocation is in a sequential manner in java
Ans is A Randomly!!
Randomly, you can access any element of array by its indices.
i am using your coding platform codestudio but while editing old code a letter is getting erased and for editing i letter i have to delete whole line and this frustating while coding it was very irratating the question was search in rotated array plz do fix this . ASAP
randomly and sequentially both
Ans is A, Randomly
a) Randomly
Ans-> sequentially
Eligibility for dsa Java course? I am not from science background
Sequentially
Answer is b-sequentially .
Randomly is the correct answer
@CodingNinjasIndia