title: strcmp on a line read with fgets
body: <p>I'm trying to compare two strings. One stored in a file, the other retrieved from the user (stdin).</p>
  
  <p>Here is a sample program:</p>
  
  <pre><code>int main()
  {
      char targetName[50];
      fgets(targetName,50,stdin);
  
      char aName[] = "bob";
      printf("%d",strcmp(aName,targetName));
  
      return 0;
  }
  </code></pre>
  
  <p>In  this program, <code>strcmp</code> returns a value of -1 when the input is <code>"bob"</code>. 
  Why is this? I thought they should be equal. How can I get it so that they are? </p>