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

How long to learn object oriented programming?

1143


Can we create object of interface?

1175


write a C++ program for booking using constructor and destructor.

2591


What is the point of polymorphism?

1091


Can you explain polymorphism?

1155


State what is encapsulation and friend function?

1341


What are the 3 pillars of oop?

1245


What are the two different types of polymorphism?

1195


What do you mean by overloading?

1128


What is destructor give example?

1117


What are functions in oop?

1120


What is constructor in oop?

1171


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

2204


Can bst contain duplicates?

1243


What is overloading and its types?

1248