1.

What Are The Memory Allocation In C/c++?

Answer»
  1. calloc() allocates a MEMORY area, the LENGTH will be the product of its parameters(it has two parameters). calloc fills the memory with ZERO's and returns a pointer to first byte. If it fails to locate enough space it returns a NULL pointer.
  2. malloc() allocates a memory area, length will be value entered as parameter.(it has one parameter). It does not initializes memory area
  3. free() used to free the allocated memory(allocated through calloc and malloc), in other words, this used release the allocated memory NEW also used to allocate memory on HEAP and initialize the memory USING constructor delete also used release memory allocated by new operator



Discussion

No Comment Found