PROGRAM
#include<stdio.h>#include<conio.h>
int a[20];
void search(int *a,int n)
{
int i,item,flag=0;
printf("\nEnter the element to be searched");
scanf("%d",&item);
for(i=0;i<n;i++)
{
if(item==a[i])
{
printf("\nElement %d is found in position %d",item,i+1);
flag=1;
}
}
if (flag!=1)
printf("\n\t!Not found");
}
void main()
{
int n,i;
char c;
clrscr();
printf("\nEnter the limit");
scanf("%d",&n);
printf("\nEnter numbers");
for(i=0;i<n;i++)
scanf("%d",&a[i]);
printf("\nThe array elements are:\t");
for(i=0;i<n;i++)
printf("\t%d",a[i]);
do
{
search(&a,n);
printf("\nPress y for search another number");
c=getche();
}while(c=='y'||c=='Y');
getch();
}