C Program for Sequential Search of a given number

It is a simplest form of searching in which the target item is searched by examining the records in the list one by one. If the target item is found then search is stopped, else proceeds to the next record until all records in the list are examined.

Source Code:
    Program to implement sequential search 
    Author: sourcecodesonline.blogspot.com
#define MAX 10 //Limit for Search list  
int main(void)  
{    int array[MAX],index=0,search_element;  
  printf("\nEnter the search list(10 elements):");  
   printf("\nEnter the element to be searched:");  
            printf("\nElement %d  found at position %d",array[index],index+1);  
    printf("\nElement %d is not present",search_element);  
Next Post »

Still not found what you are looking for? Try again here.