Compare words in one file
The first most glaring problem I see is sleep(2).  We really don't want to be doing this, particularly with Objective-C programs.  The main reason I add emphasis on Objective-C is because virtually every program written in Objective-C is either an OSX or iOS app with a GUI.  And in these cases, the main thread is the thread that handles the GUI.  You'll also be writing the bulk of your code on the main thread--certainly until you start figuring out multithreading.  Everything defaults on the main thread.

And a call to sleep(someNum) on the main thread means that the user only has one way of interacting with our program for someNum amount of time--by closing it out.

There are other ways to delay actions in our code without putting the entire thread to sleep.  In the case of this simple code, there's no interaction anyways, but in the future, you will run into this problem.

For the most simple example of how to point you in the right direction, Objective-C offers performSelector:withObject:afterDelay: (though this requires the use of objects &amp; methods).  

But there's also a non-OOP way of executing code after delays in Objective-C (it's a lot messier than performSelector:withObject:afterDelay:, and I had to look up the exact syntax...).  It makes use of code blocks.

A code block is similar to a C-style function, but we have a variable that is a pointer to it (yes, I know C and other languages have "function pointers"--we call them blocks in Objective-C).  Anyway, the syntax for executing code in a block after a delay looks like this:

int delay = dispatch_time(DISPATCH_TIME_NOW, 2 * NSEC_PER_SEC);

dispatch_after(delay, dispatch_get_main_queue(), ^{
    // any code you want executed after delay
    // in this case, delay is 2 seconds
});


Where 2 is the number of seconds you want to delay, and everything else is built-in C or Objective-C constants/functions.