title: Finding substring in a string
body: <p>I am writing a function to find substring. But I am not sure where i am going wrong.
  On running GDB i get a segmentation fault. If someone can guide me in the right direction.</p>
  
  <p>here is the code</p>
  
  <pre><code>char *mystrstr(char * s1, const char * s2)
  
  
  
  int main(){
      char *s1 = "The quick brown fox jumps over the hell lazy dog";
      char *s2 = "hello";
      char *s4;
      s4 = mystrstr(s1,s2);
      printf("%s\n",s4);  &lt;--- this is where i am Seg. Faulting
  
  
  
      return 0;
  }
  </code></pre>