This is programming. What you thought was programming was in fact just memorising syntax. If you struggle to think about how to do this, programming isn't for you.
-------------
Open file
Get word from user
Read two words from file. If first word matches user input, output second word and end. If first word does not match, read in next two words and repeat.
Just post what you have done so far and we'll help you through it...
Nobody cares how "urgent" it is, everybody says that when they haven't done their homework. Don't fool yourself either, you will get NOWHERE in EE these days without good programming skills. Except for a few niche products you'll find that almost all "analog circuitry" out there is DSP running in an FPGA. The ability to write good code is no longer optional.
Try it. You have plenty of time to work this simple problem out by Monday... You might even like it!