answersLogoWhite

0

stdlib.h

Next time try the built-in help/manual before asking.

User Avatar

Wiki User

11y ago

What else can I help you with?

Related Questions

71 Which function should be used to free the memory allocated by calloc?

free() is a function used to free the memory allocated dynamically ,by both malloc and calloc functions. free(ptr): ptr is a pointer to a memory block which has already been creeated by malloc or calloc.


What if happen when you allocate memory by using malloc or calloc when the momory is not available contigiously?

malloc/calloc/realloc will return NULL


Which of libraries calloc belongs?

malloc()


Difference between malloc and alloc?

alloc is used as header file while using malloc and calloc functions in C prog.The definition of malloc function is in the alloc.h file.It's stdlib.h to be more precise


What is the difference between Malloc and calloc in C and JAVA?

In C, malloc is used to reserve a predetermined size of memory. void * malloc ( size_t size ); calloc is used to reserve a chunk of memory large enough to store num elements, each of a predetermined size. void * calloc ( size_t num, size_t size ); To create a char array of size 10 you can do it in one of two ways: char* mChars = malloc( 10 * sizeof(char) ); char* cChars = calloc( 10, sizeof(char) ); There is no concept of malloc or calloc in Java.


Contiguous memory allocation program in Linux?

malloc or calloc


In which way calloc is better than malloc?

What calloc does is: void *calloc (size_t s1, size_t s2) { size_t s= s1*s2; void *p= malloc (s); if (p && s) memset (p, 0, s); return p; }


What is the malloc function?

The malloc function is one of a group of memory allocation functions; malloc, calloc, realloc, and free. Specifically malloc (size) returns a pointer to a new memory block of at least size bytes, suitably aligned for optimum access for any basic type, or it returns a NULL if the request cannot be satisfied.


Which function should be used to free the memory allocated by calloc?

Use the free function to release memory that was previously allocated by malloc, calloc or realloc.


What is the operator is used to allocate the memory in c plus plus?

calloc operator,malloc operator


How do you use malloc and calloc to allocate memory for 100 integers?

int *p, *q; p = (int*) malloc (100 * sizeof (int)); q = (int*) calloc (100, sizeof (int)); Note that p is left in an uninitialised state whereas q is initialised with the value zero.


What are the different types of memory allocations in c?

1.malloc 2.calloc 3.realloc 4.free