title: Crashing on strcpy, not sure why?
body: <pre><code>   if (strlen(shortest) &gt; strlen(longest)) {
              char *temp;
              strcpy(longest, temp);
              strcpy(shortest, longest);
              strcpy(temp, shortest);
       } 
   }
  </code></pre>
  
  <p><code>strcpy(longest, temp)</code> --> is causing my program to crash. Here is a detailed crash report (I've included the proper header file, so it's not that. Also compiler warned me of using uninitialied temp variable...):</p>
  
  <blockquote>
    <p>Program received signal SIGSEGV, Segmentation fault.<br />
    __strcpy_ssse3 () at ../sysdeps/i386/i686/multiarch/strcpy-ssse3.S:85<br />
    85      ../sysdeps/i386/i686/multiarch/strcpy-ssse3.S: No such file or directory. </p>
  </blockquote>