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 / praviss

An existing block of memory which was allocated by malloc() subroutine, will be freed by free() subroutine. In case , an invalid pointer parameter is passed, unexpected results will occur. If the parameter is a null pointer, then no action will occur.
Where as the realloc() subroutine allows the developer to change the block size of the memory which was pointed to by the pointer parameter, to a specified bytes size through size parameter and a new pointer to the block is returned. The pointer parameter specified must have been created by using malloc(),calloc() or realloc() sub routines and should not deallocated with realloc() or free() subroutines. If the pointer parameter is a null pointer, then no action will occur.

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are oops functions?

1035


Is data hiding and abstraction same?

1049


Explain the advantages of inheritance.

1151


Why we use classes in oop?

1046


What is the important feature of inheritance?

1143


is there any choice in opting subjects like 4 out of 7

2193


What is Difeerence between List obj=new ArrayList(); and ArrayList obj=new ArrayList()?

2542


What is property in oops?

1065


What is the main feature of oop?

1151


Write A Program to find the ambiguities in Multiple Inheritance? How are they resolved.(Virtual Functions)

4152


What are the benefits of polymorphism?

1279


What is polymorphism in oop example?

1031


What is object and class in oops?

1073


Prepare me a program for the animation of train

2478


What is object-oriented programming? Webopedia definition

1267