DispTitle() {
/* display title */
ClrRow(3);
printf("\nThis program is to create a file with details of friend. ");
printf("\nUser have to key in friend information that will later");
printf("\nbe stored in a file named \"friend.dat\".");
ClrRow(1);
}

Secondly, try fixing the mode of fopen from w to a (append), which will add to the file instead of over-writing it each time the program is called (if this is an issue), in which case you'll also need to read the last line to get the highest number record.

I would also advise using fgets() instead of gets(), it provides for safer string reading.

But to your problem...

I see that you're using a getche() method, and can honestly say that I have never heard of it. try getchar(); instead.