It is also known as a sequential search. The program for linear search is written in C language. It works by comparing each element of an array. 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. It is straightforward and works as follows: We keep on comparing each element with the element to search until it is found or the list ends. Linear search is a searching algorithm which is used to detect the presence of a number in an array and if present, it locates its position in that array.. Please refer complete article on Linear Search for more details!. Check the other linear search articles given below. C program to read a character from keyboard and print it in reverse case i.e if input is lower case output will be upper case and vice versa, C program to check whether a number is palindrome or not, C program to check whether a string is palindrome or not, C program to calculate the area of square with and without using function, C program to check whether a number is prime or not, C program to check whether a number is positive, negative or zero, C program to display prime numbers between two numbers using function and without using function, C program to find LCM and GCD using recursion, C program to sort array using bubble sort algorithm, Linear Search in C Programming – Program and Explanation, C program to make calculator using switch case, C program to convert temperature from degree celsius to fahrenheit, C program to compare two numbers without using relational operators, C program to encrypt and decrypt the string, C program to convert roman number into decimal number, C program to multiply two number without using multiplication(*) operator, C program to test if a number is a power of 2. All the elements need not be in sorted order like binary search. Linear search is also called as sequential search. Linear search for multiple occurrences and using a function. Searching is the process of finding particular value in an array. This program generates data that are stored in an array and find the value entered by the user in that array. In the above program, we have generated multiples of 2 and stored in the array data. if element Found at last O(n) to O(1) if element Not found O(n) to O(n/2) Below is the implementation: There is the user-defined function called linearSearch( ) that searches the user query in an array. It is the most basic and easiest algorithm in computer science to find an element in a list or an array. In this blog on “Linear search in C”, we will implement a C Program that finds the position of an element in an array using a Linear Search Algorithm. We have to write a C Program which finds the position of an element in an array using Linear Search Algorithm. C Program to Find Factorial of a Number using Functions, C Program to Find Biggest of Two Numbers using Ternary, C Program to Sort an Array using SELECTION SORT, C Program Example to Initialize Structure Variable, C Program to Find Number of Characters and Words in a String, C Program for Monthly Bill of a Newspaper, C Program to Find an Element Using Linear Search. The time complexity of the above algorithm is O(n). This algorithm compares each element of the array with the search query comparing every element until the number is found and located. If it's present, then at what location it occurs. Linear search is also called as sequential search. Linear search in C to find whether a number is present in an array.