In create_file:
Code:
for ( i = 1; i < N; i++ )
This will only generate N-1 random numbers. I suggest the more common idiom of
Code:
for (i = 0; i < N; i++)
In main:
Code:
return 0;
system("pause");
You had this problem in your other thread. Seriously, pay attention to what you're doing, and to the advice people give you when you ask for it. Ignoring advice does not inspire us to help you.

Laserlight asked you to make an attempt, but all you did was use code from your last thread and put in a function prototype for heap_create. You need to make a real attempt. You know, write some actual code for the heap sort algorithm. Who cares if it's a train wreck. Show us you're serious about trying this and learning this yourself. You said you've made attempts before, so post one of those. Or, start by reading the Wikipedia article on heap sort (it's a bit technical, but thorough). Google for tutorials and sample code, there's plenty out there.

Give it a shot and post back with some specific questions, and you'll probably get more specific help.