Write a program to accept 10 different numbers in a single dimensional array. Now enter a
number and search whether the number is present or not in the list of array elements using
the “Linear Search” technique.
Answers
Answered by
3
in attach
Attachments:
Answered by
0
Answer:
Input : arr[] = {10, 20, 80, 30, 60, 50,
110, 100, 130, 170}
x = 110;
Output : 6
Element x is present at index 6
Input : arr[] = {10, 20, 80, 30, 60, 50,
110, 100, 130, 170}
x = 175;
Output : -1
Element x is not present in arr[].
Similar questions