title: implementation of strstr() function
body: <p>The code says at many places "invalid indirection".Please help.</p>
  
  <pre><code>   int main()
      {
  
          char *s1,*s2,*position;
          printf("Enter string:\n");
          gets(s1);
          printf("Enter word to find:\n");
          gets(s2);
          *position=ststr(*s1,*s1);
          if(*position)
          printf("word is found at %c loc\n",*position);
          else
          printf("word not found");
          getch();
          return 0;
  
      }
  
  char *strstr(char *s1,char *s2)
  {
      int flag=1;
      char i,j;
      for(i=0; ;i++)
      {
          if(*s1[i]==*s2[0])
          for(j=i;*s2;j++)
          {
              if(*s1[j]!=*s2[j])
              flag=0;
          }
  
      }
      if(flag)
      return i;
      else
      return 0;
  }
  </code></pre>