LINEAR Structures
LINEAR Structures
#include<iostream.h>
#include<conio.h>
#include<process.h>
struct linear
{
char str[20],s;
}l;
void main()
{
clrscr();
cout<<"Enter a string :\n";
cin>>l.str;
cout<<"Enter a searching element :\n";
cin>>l.s;
for(int i=0;l.str[i]!='\0';i++)
if(l.s==l.str[i])
{
cout<<"found";
exit(1);
getch();
}
cout<<"Not found";
getch();
}