I'm supposed to read all the words from text file and use bubble sort to sort the word and count their occurrence.
As I read each word from file, what is the exact thing I need to do? Do I need to store the word (as char array) somewhere to have a pointer pointing at those words? and populate the array of pointers as I read more words? I have knowledge of other language like java but I'm new to the concept of pointer. I can't find an example where I deal with actual words with pointers. I've found something with pointers and characters in a single word. I need to deal with multiple words.
while (fscanf(myfile, "%s", str) != EOF) {
//I understand str is the words that I go through
//How can I have arrays of pointers to point all the words in the text file?
//How can I dynamically populate words with pointers?
}