"Heads or Tails" game
Unnecessary loop

I noticed this code:


for(int i = 1; i &lt; 2; i++)
{
    number = 1 + (rand()%2);
}



It's a loop that loops exactly once, and it doesn't even use i inside the loop.  So you can just remove the loop part:

number = 1 + rand()%2;


Unecessary recursion

At the end of headsOrTails(), you have this code:


while((playAgain == 'Y') || (playAgain == 'y')){
    headsOrTails();
}
while((playAgain == 'N') || (playAgain == 'n')){
    exit(EXIT_FAILURE);
}




Each while here could really be an if.  Neither of the loops actually loop.
It's not a good practice use recursion for no reason.  Ideally, you would have a loop in main() that calls headsOrTails() as long as the user wants to keep playing.  That way, you wouldn't need recursion.  The only reason this even works instead of continuing indefinitely is because you call exit() eventually.
Why EXIT_FALURE?  That means your program will always return failure.  I would use EXIT_SUCCESS instead.