I would like to know if there is a method for reading characters from a file and saving them into an array without a specified array length.
In normal situation I read all the characters and count them. (step 1) Then I create the array with malloc and read the characters from the file, so I am forced to read the whole file twice. Can it be done with only one reading?