title: String compare in c with fgets
body: <p>this is just a simple code i just wrote and i dont understand why it wont give me true when i type mother in the stream. It's logical for me when they compare each other it must be the same or?<br>
  this is my simple code:</p>
  
  <pre><code> char string[20];
   fgets(string,20,stdin);
  
   printf("%s",string);
  
   if(strcmp(string,"mother")==0)
   {
     printf("they are the same");
   }
   else
   {
       printf("they are not");
   }
  </code></pre>
  
  <p>i also tried with </p>
  
  <pre><code> if(string =="mother")
   \\do something
  </code></pre>
  
  <p>but it wont just give me true can someone help me</p>