For pset3, I have to download
pset3.zi and unzip it.
I followed all the steps in the instruction. However, when I get to the program
find.c, there's a problem.
The program seems like not working properly. To be clear, this program is provided in the distribution code, not written by me.
As you can see below, the program will look for the number in the command line from a list of numbers I put in when the program is executing.
I put in
15 at the command line and enter
16 for the set of values. So it's supposed to output
Found needle in haystack!. However, the program outputs
Didn't find needle in haystack. instead.
jharvard@appliance (~/Dropbox/pset3/find): make find make: `find' is up to date. jharvard@appliance (~/Dropbox/pset3/find): ./find 15 haystack = 13 haystack = 14 haystack = 15 haystack = 16 haystack = Didn't find needle in haystack. jharvard@appliance (~/Dropbox/pset3/find):