What is realloc() and free()? What is difference between them?



What is realloc() and free()? What is difference between them?..

Answer / hrpynux@gmail.com

The free subroutine frees a block of memory previously allocated by the malloc subroutine. The realloc () function is used to allocate memory and has the following prototype: void * realloc (void * ptr, unsigned int num);

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

Can a class be static in c++?

0 Answers  


Specify some guidelines that should be followed while overloading operators?

0 Answers  


What is class syntax c++?

0 Answers  


Describe private, protected and public – the differences and give examples.

0 Answers  


What is a Default constructor?

1 Answers  






What is c++ library?

0 Answers  


Why do we use constructor?

0 Answers  


how to find the maximum of 10 numbers ?

5 Answers  


Show the declaration for a static member variable.

0 Answers  


how is returning structurs from functions?Show an eg?

1 Answers   GE,


How would you use qsort() function to sort an array of structures?

0 Answers  


Give 2 examples of a code optimization?

4 Answers  


Categories