It usually means that you have an infinite loop.
Your do while loop is dependent of finding EOF on your infile, or file you are reading from, but you never actually read from this file, you have two fwrite() calls but no fread() call so your program never encounters that EOF flag.
At the beginning of your loop you might want to change that fwrite() call to an fread() so that you actually start reading from your inpointer.