#include<conio.h>
#include<iostream.h>
# define r 10
void main()
{ clrscr();
int a[r];
int w,x,y,z;
for(int i=0;i<r;i++)
{ cin>>a[i];
}
cout<<"which element do you want to search ? ";
cin>>x;
for(i=0;i<r;i++)
{ if (x==a[i])
{ cout<<x<<" is present in the Array ";
y=sizeof(x);
cout<<" Size of "<<x<<" is "<<y<<"\n";
cout<<"Index of "<<x<<" is "<<i<<"\n";
}
}
getch();
}
#include<iostream.h>
# define r 10
void main()
{ clrscr();
int a[r];
int w,x,y,z;
for(int i=0;i<r;i++)
{ cin>>a[i];
}
cout<<"which element do you want to search ? ";
cin>>x;
for(i=0;i<r;i++)
{ if (x==a[i])
{ cout<<x<<" is present in the Array ";
y=sizeof(x);
cout<<" Size of "<<x<<" is "<<y<<"\n";
cout<<"Index of "<<x<<" is "<<i<<"\n";
}
}
getch();
}