You must be joking, you are not mentioning what errors you are getting , what sort of an application this is (console or gui), what you have tried to solve those errors, ... in fact you have not even mentioned which compiler you are using !!!
And you expect us to solve those errors for you ????
I have seen this code before. It was written by Kanetkar in a book dedicated for the turbo c complier.
In my first glance I found these.
1) some of the codes are missing. ( initgrraph(), etc which will make a interrupt )
2) malloc returns a void pointer which needs to be type-casted.
3) stdlib.h, conio.h required.
4) no arguments for exit().
Besides, Why should you used such old compilers & its nonstandard libraries?