I have a list of consonants now I want to use the last wordin the list to compare

This is a discussion on I have a list of consonants now I want to use the last wordin the list to compare within the C Programming forums, part of the General Programming Boards category; Step one:
The input has to be split into a string word per line and saved to file.
Then fgets ...

I have a list of consonants now I want to use the last wordin the list to compare

Step one:
The input has to be split into a string word per line and saved to file.
Then fgets reads each line and stops when the file is NULL.

Step two:
Then I want to For loop the file and if a word in the list has a consonant I want to print that in the console window.

Step three:
Then using the lists last word consonants, starting at the first word in the list, I want to compare the other words consonants to it.
When the consonants match, the next word in the list is compared,
When the next word doesn't share a consonant with the last word the comparison ends.
Then I want to print the matching words and last word in the console window.

So I managed to get results from comparing the consonants of the last word to the other words in the sentence, but now I don't know how to print the original string sentences instead of it's consonant only version.

I input a sentence then get the consonants in the last word.
Then I compare the rest of the sentences consonants agint the last words consonants looking for a match.
The matching words in consonant only form are saved to file and displayed on screen.

I don't know how to display the original forms of the matching words though so it's a paraphrased sentence, but with whole words.
I tried putting two fgets each in their own while loop so both files are read in on while loop, that didn't work.
I thought about putting the list into memory but that doesn't make sense to me, how would the words be separated.
I tried some for loops to no avail.
So I'm stuck right now and could use some sage advice to help me solve this problem.

Input a sentence. Press Enter when done.
Scientists are trying to figure out how to link the devices you own directly to
your brain without an actual physical The Matrix-like cranial plug
trying
figure
link
directly
actual
physical
Matrixlike
cranial
plug
Press any key to continue . . .

Code:

Input a sentence. Press Enter when done.
We will make our own energy instead of relying on monopolizing power companies
make
own
energy
instead
relying
on
monopolizing
power
companies
Press any key to continue . . .

Input a sentence. Press Enter when done.
Strangely, people also use search engines to find other search engines
Strangely
also
use
search
engines
find
search
engines
The last word is: engines
Press any key to continue . . .

Still waiting to see if anybody has any advice to give me about this code.

Input a sentence. Press Enter when done.
The scientists now believe that they have found a path that could enable more po
werful microscopes, telecommunications and computers. Specifically, the discover
y is expected to have effects on technologies for "steering and shaping laser be
ams for military and communications applications, nanocircuits for computers tha
t use light to process information, and new types of powerful lenses for microsc
opes."
scientists
that
they
path
that
could
more
powerful
microscopes
telecommunications
computers
The last word is: computers
Specifically
discovery
is
expected
effects
technologies
for
steering
shaping
laser
beams
for
military
communications
applications
nanocircuits
for
computers
use
process
information
types
powerful
lenses
for
microscopes
The last word is: microscopes
Press any key to continue . . .

I would suggest that you need more functions so you can get rid of the goto statements. You should try to get each function to do one thing if possible. You might also want to open and test your file opening before all of your mallocs. That way you can just return an error code to the calling function and not have to worry about all the cleanup of the variables.