top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What function should be used to free the memory allocated by calloc() ? and how?

+3 votes
1,109 views
What function should be used to free the memory allocated by calloc() ? and how?
posted Jul 19, 2016 by Vrije Mani Upadhyay

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

2 Answers

0 votes
 
Best answer

Hi ,

You can use free(ptr) to free the memory assigned by calloc

answer Jul 19, 2016 by Jaganathan
+1 vote
free()   function is used to free dynamically allocated memory,

No matter how you have allocated, For Ex. using malloc(), calloc(), realloc().

answer Jul 20, 2016 by Chirag Gangdev
...