I made a for loop for searching and sorting in the header file. Both loops start off like this:
for (int i = 0; i < n ; i++)
find.c compiles fine for me but when I put the needle at the end of the array, it doesn't work. But it works fine if the needle is at the top or in the middle of a sorted or unsorted array. Can someone please lead me to the right direction?