title: Reading text from a file using fscanf()
body: <p>guys i want to read the text from my file and assign every character to a single element of the array</p>
  
  <pre><code>char A[1000];
  
  FILE * fpointer;
  fpointer=fopen("text.txt","r");
  
  i=0;
  while(!feof(fpointer))
  {
      fscanf(fpointer,"%c",&amp;A[i]);
      i=i+1;
  }
  
  fclose(fpointer);
  
  for (i=0;i&lt;100;i++)
  {
      printf("%c",A[i]);
  }
  
  return 0;
  </code></pre>
  
  <p>but the problem is that the output is some weird symbols instead of the file's text which is "This is just a test".Why is that happening ?</p>