Linear Search in C

Here you will find program for linear search in C.

Linear search is the simplest searching algorithm which is sometimes known as sequential search. In this algorithm each element of array is compared with the targeted element sequentially.

Linear Search in C

 

Output 

How many elements?4
Enter array elements:
6 8 9 1

Enter element to search:9
Element found at index 2

Leave a Reply

Your email address will not be published. Required fields are marked *