Binary search is a fast algorithm for finding a single item in a sorted list of items. It works by repeatedly dividing the portion of the list that could contain the item in half until you’ve reduced the number of possible locations to just one.

A linear search, also known as a sequential search, is a technique for locating an element within a list. It iteratively checks each element of the list until a match is found or the entire list has been searched.

A linear search is the most basic way to search a data set. Each item of data is examined until a match is found, beginning at the beginning of the data set. The search is over once the item is located. If no match is found, the algorithm must deal with it.

Counting is used to find how many numbers or items there are in a list. Counting can be used to keep track of how many iterations your program has gone through in a loop. Using this count keyword we have executed this sequential search in c

```
//sequential search in c
#include <stdio.h>
int main()
{
int arr[50], search, cnt, num;
printf("Enter the numbers\n");
scanf("%d",&num);
printf("Enter %d integer(s)\n", num);
for (cnt = 0; cnt < num; cnt++)
scanf("%d", &arr[cnt]);
printf("Enter the number to search\n");
scanf("%d", &search);
for (cnt = 0; cnt < num; cnt++)
{
if (arr[cnt] == search)
{
printf("%d is present at location %d.\n",search,cnt+1);
break;
}
}
if (cnt == num)
printf("%d is not present in array.\n",search);
return 0;
}
```

Output of sequential search in c:

Enter the numbers

3

Enter 3 integer(s)

34

56

78

Enter the number to search

34

34 is present at location 1.