. Write a C program that reads an array of n integers and check whether a given integer is present
in the array. If it is present in the array, print the position of the element in the array( array
indexing starts from 0). If the element presents more than once in the array then print all the
positions where the element is present in the array. Otherwise, print -1. (Hint:Use linear search)
Input : Number of elements in the array : 6
Elements: 4, 3, 12 , 5 , 4, 3
Enter the element to be searched : 4
Output:Position of element is : 0, 4
Input : Number of elements in the array : 6
Elements: 7, 8, 12 , 5 , 4, 3
Enter the element to be searched : 6
Output:Position of element is : -1
Answers
Answered by
2
Answer:
what the matter broooooo
Similar questions