That makes me believe you are not a truth teller. You ARE in a class and
totally lost. the code posted made no sense, and a self-student would at
least realize that.
"No sense?" The code compiles, executes, and satisfies the
requirements of the question (if you squint enough when reading
and make reasonable assumptions about age ranges). By intention
it is not a strictly conforming program, but it is almost entirely
portable (diagnosing the two small portability problems is left
as an exercise). "No sense?" C'mon!
....
That's what I told. I could not get any sense from that piece of code.
That is a more believable statement than your earlier comment that
osmium objected to: "I understood evrything except these lines of 3rd
function". As Bart said, Eric's response was meant as a joke; you will
often get responses like that if you ask a question that looks like
homework, and give no indication that you've made any attempt to work on
it on your own.
If you had even a minimal understanding of C, there should have been
some questions you would have been asking as soon as you finished
understanding the first two functions, even if you had not yet realized
it was a joke:
1. Where are the names and the ages stored after they are read in from
the input file?
2. When the program asks for a name, and the user types it in, where is
the name stored?
Even if you can't figure out the answers to those questions, failing to
even ask them implies a really poor understanding of C. This seems like
a fairly elementary exercise, but it requires an understanding of C
greater than your current level. If you really do want to learn C, I
recommend backing up and working on some simpler exercises before
tackling a problem as complicated as this one.
If you had understood the third function as well, you should have been
asking an additional question:
3. What is the connection between the names in the data file, the name
that the user types in, and the age that is prints out?
I recommend examining the code carefully to figure out what's wrong with
it - you'll learn some important things about computer programming.
Important point: there's nothing significant wrong with it, as a C
program. The key problem with it is the connection between what that
program does and the instructions you were given. Technically, it obeys
those instructions, but only by completely ignoring the clearly intended
meaning of word "corresponding".