#include #include using namespace std; int index1(char *T,char *P) { int t=0,p=0,i,j,r; t = strlen(T); p = strlen(P); i=0; int max = t - p + 1; while(i>c; cout>d; l = index1(c,d); cout


#include
#include
using namespace std;
int index1(char *T,char *P)
{
int t=0,p=0,i,j,r;
t = strlen(T);
p = strlen(P);
i=0;
int max = t - p + 1;
while(i<>
{
for(j=0;j{if(P[j]==T[i+j])
{r = i;
break;
}
else r = -1;
}
i++;
}
return r;
}


int main()
{

int l;
char c[100];
char d[100];
cout<"enter first="">

cin>>c;
cout<"enter second="">
cin>>d;
l = index1(c,d);
cout<>


return 0;
}


Note: Remove Funcation



Jun 04, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions ยป

Submit New Assignment

Copy and Paste Your Assignment Here