title: Convert char array into double
body: <p>I have tried this:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  int main(int argc, char *argv[]) {
  
  FILE *txt1;
  char tam[13];
  char tam1[13];
  char tam2[13];
  
  txt1 = fopen("C:/Users/Hugo/Documents/C/in2.txt","r");
  if(txt1 == NULL)
  {
      printf("No se puede leer el archivo");
      return 0;
  }
  fgets(tam1,sizeof(tam1), txt1);
  double c = atof(tam1);
  printf("%f",c);
  </code></pre>
  
  <p>when I debug: <code>tam1</code> is "3.1415926535" But it prints this: </p>
  
  <blockquote>
    <p>0.000000</p>
  </blockquote>