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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Can turbo c++ run c program?

627


What happens if a pointer is deleted twice?

783


Which is best ide for c++?

561


Write an algorithm that determines whether or not an almost complete binary tree is a heap.

3425


Explain about Virtual Function in C++?

606






What data encapsulation is in c++?

591


What is the use of structure in c++?

549


Explain Memory Allocation in C/C++ ?

630


How can you say that a template is better than a base class?

580


What are the vectors in c++?

577


Is string data type in c++?

579


Can circle be called an ellipse?

630


find the two largest values among the 6 numbers using control structures : do-while,for,if else,nestedif- else ,while. one or two of them.

1993


Is c++ faster than c?

592


We use library functions in the program, in what form they are provided to the program?

591