Quote:
Originally Posted by Tango Issac Debian
see the two declarations .....

i) int i;
ii)p=(int*)malloc(size of(int));


Both of this functions used here to allocate the memory .
First of all

Code:
int i;
is not a function its a defination(as well as decleration).Whenever compiler comes across such statement, it automatically allocates memory(amount varies from compiler to compiler) on stack at compile time. There is no function in standard "C" to explicitly delete the statically allocated memory. This memory will automatically be deleted by compiler as the scope of the variable ends. You do not need to worry about it.

Quote:
Originally Posted by Tango Issac Debian
But in case of the malloc ,we use then the free(p),But not for the case of int i,,,,,,,,,,,,,,,,,,,,,,,,
Any memory allocation done by malloc or calloc is done on heap. It becomes the responsibilty of the programmer to make sure that memory should be released after use.

Don't even think of using free on statically allocated memory. It will most probably be leading to crashing of program.