You should always capture the return value from fscanf() and scanf() to insure that data was input,
thmm, your line numbers might not match the line numbers in his latest code. Try compiling with a fresh copy of his code, preserving the blank lines.