Text from an input file into a 2d Char Array

I'm confused how I'm supposed to get text from an input file and put it into a character array. My assignment is to use strtok() and get tokenize sentences into words and put those words into a 2d character array with each row being a word. Could someone point me in the right direction? Thanks!

for example if I tokenized the word "Dog" it would like look this:
array = { {d, o, g}, {d, a, t}, etc. } for all of the words. I have no problem tokenizing them, just taking the tokens and putting them in the 2d character array.
Last edited on
Can you tell us what is your expected output?
I'm sending statistics to an output file that is support to track:
the total amount of words,
each unique word,
the longest word in the file,
shortest word in the file,
and print each word and the amount of time it occurs in the file.

I'm also supposed to keep an array of ints that corresponds to the element in the character array with how many times that word appears in the file.
Topic archived. No new replies allowed.