#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="">"enter>cin>>c;cout<"enter second="">"enter>cin>>d;l = index1(c,d);cout<>return 0;}Note: Remove Funcation
int main(){int l;char c[100];char d[100];cout<"enter first="">"enter>cin>>c;cout<"enter second="">"enter>cin>>d;l = index1(c,d);cout<>
return 0;}
Note: Remove Funcation
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here