answersLogoWhite

0

by using index position we can find the particular element in array.

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

The contents of a particular element of an array is called?

It is the value of the element.


What is the index number of the last element of an array with 9 elements?

(array.length - 1) will find the index of the last element in an array (or -1 if the array is empty).


How will you find the location of an element of an array?

Basically, &array[i]; That is, the memory location for an array object with index i. Or, you can do: (array + i);


What search begin the search with the first array element?

To search, you would start with the first element of the array and compare it with the target value. If the first element matches the target, you found it. If not, you would move to the next element in the array and repeat the process until either you find the target or exhaust all elements in the array.


How can you find factorial of each element in array using pointer?

To find the factorial of each element in an array using pointers in C, you can create a function that takes a pointer to the array and its size as parameters. In the function, iterate through the array using pointer arithmetic, calculating the factorial for each element and storing the result back in the same array or a separate array. For calculating the factorial, you can use a simple loop or recursion. Finally, print or return the modified array with the factorials.


How many comparisons are typically required in a binary search algorithm to find a specific element in a sorted array?

In a binary search algorithm, typically log(n) comparisons are required to find a specific element in a sorted array, where n is the number of elements in the array.


The minimum number of comparisons requied to find the second smallest element in a 1000 element array is?

1010


What is the maximum number of comparisons required in a binary search algorithm to find a specific element in a sorted array?

The maximum number of comparisons required in a binary search algorithm to find a specific element in a sorted array is log(n), where n is the number of elements in the array.


What is the value of the kth smallest element in the given array?

The value of the kth smallest element in the array is the kth element when the array is sorted in ascending order.


Write a c program to find the maximum value of 25 element in an array?

int findMax(int *array) { int max = array[0]; for(int i = 1; i < array.length(); i++) { if(array[i] > max) max = array[i] } return max; }


Will an array element be deleted when you retrieve it from the array?

You cannot delete from an array.


What is the time complexity of an algorithm that uses a binary search to find an element in a sorted array in logn time?

The time complexity of an algorithm that uses binary search to find an element in a sorted array in logn time is O(log n).