title: C strstr issue, Returning 0 even when should be 1?
body: <p>Spent a while trying to debug this. Strstr always returns 0, even when I pass an argument like "town" that should make sense and print 1. What am I doing wrong here?</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;string.h&gt;
  
  char tracks[][80] = {
      "I left my heart in Harvard Med School",
      "Newark, Newark - a wonderful town",
      "Dancing with a Dork",
      "From here to maternity",
      "The girl from Iwo Jima",
  };
  
  void find_track(char search_for[])
  {
      int i;
      for (i = 0; i &lt; 5; i++) {
          if (strstr(tracks[i], search_for)) // Always 0 never 1?
              printf("Track %i: '%s'\n", i, tracks[i]);
      }
  }
  
  int main(void)
  {
      char search_for[80];
      printf("Search for: ");
      fgets(search_for, 80, stdin);
      find_track(search_for);
      return 0;
  }
  </code></pre>