Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Difference between realloc() and free?

Answer Posted / fathimath fahima j

free :
#include <cstdlib>
Void free (void *ptr);

Free() function returns the memory
Pointed to by ptr to the heap. 

Realloc :
#include<cstdlib>
Void *realloc(void *ptr,size_t size);

The realloc function changes the size of
the previously allocated memory pointed to by ptr to dat specified by size.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is difference between class template and template class?

2662


write a program to enter a string like"sunil is a good boy and seeking for a job" not more than 10 characters including space in one line,rest characters should b in other line.if the next line starts from in between the previous word,then print whole word to next line.

2243


Why is polymorphism important in oop?

1086


Will I be able to get a picture in D drive to the c++ program? If so, help me out?

2199


Why we use classes in oop?

1046


Why can't we have instance(stack) of a class as a member of the same class like eg.Class A{A obj;} as we can have self refential pointer

2157


What is data binding in oops?

1101


What is polymorphism what are the different types of polymorphism?

1014


What is overriding vs overloading?

1066


What is polymorphism used for?

1069


Get me an image implementation program.

1991


Why do we need oop?

1206


Can a destructor be called directly?

1076


Why do we use polymorphism?

1088


What are the two different types of polymorphism?

1147