/* Linear Search */ #include #include int main() { int i, arr[10],srch; for(i=0;i<10;i++) scanf("%d",&arr[i]); printf("Enter no. to search: "); scanf("%d",&srch); int found; found=-1; for(i=0;i<10;i++) { if(arr[i]==srch) found=i; } if(found==-1) printf("Not found"); else printf("Found at %d", found); system("pause"); }