My program reads text files of different sizes. The way I would do it is to store all characters in an array and then process them.
What I have in mind is to create a dynamic array where the size will be determined by the file size.
I have 2 questions,
1. Is my approach right?, if yes please show me how to create dynamic array keeping in mind I will be reading text files of different sizes. I would appreciate a clear example since I am new to C.
2. If my approach is wrong, please let me know the correct way, with example.
Thanks in advance,