Separate long string into multiple arrays
I have a program to write where a user enters up to 10 strings, ending the input with -1 to let the program know the user is finished. Then takes those strings and compares them to remove duplicates, then prints the individual strings as one entire string with each individual string separated by a white space.
My problem is with the separation of the strings. with gets() you can get one of the individual strings and store it into an array.. And the next call of gets() should pick up where the last one left off, but I don't really know the most efficient way to do so. You can easily get each individual string using a for loop but I'm not sure how to increment the arrays so that each run of the loop stores a string to a different array.
Any suggestions on how to approach it?