I have tried to reading a text file but the array stores only the last line of the text file.
    char cleanedText[10000]={'\0'};
    while(!feof(fileptr))
      {
        fgets(cleanedText, 10000 , fileptr);
      }
But,the cleanedText stores only the last sentence which is written in the text line.
For example these two is written in the text,
asdasdasd
thisisus
When i print the cleanedText.
The screen just shows thisisus.
What is the problem?
 
     
    