title: String length Error
body: <p>I am reading the string from the stdin using fgets function and then trying to print the length of the string, But I am always getting the length of the string as 1 always for the first time 
  Here is my code</p>
  
  <pre><code>#incldue&lt;stdio.h&gt;
  #include&lt;string.h&gt;
  int main(void)
  {
     printf("\n Enter the no of test cases");
     scanf("%d",&amp;t);
     int i,j;
     for(i=0;i&lt;t;++i)
     {
       char song[500],val[28];
       int k=0,x=0;
       fgets(song,500,stdin);
       int len=strlen(song);
       printf("\nlen=%d",len);
     }
    return 0;
  }
  </code></pre>
  
  <p>I am always getting 1 as the length for the first test case :/
  Please suggest where i am going wrong </p>