C Programming - Memory Allocation - Discussion

Discussion Forum : Memory Allocation - General Questions (Q.No. 2)
2.
What function should be used to free the memory allocated by calloc() ?
dealloc();
malloc(variable_name, 0)
free();
memalloc(variable_name, 0)
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
22 comments Page 2 of 3.

Lijina said:   1 decade ago
malloc() and calloc() are used to allocate space in memory but one difference is there allocating methods.

malloc() : malloc(int) only passing one arguments int allocates 2 bytes.

calloc() : calloc(int,5) passing two arguments int allocates 2 bytes, also 5 times 2 bytes will allocates.

Wahid sayed said:   1 decade ago
Why is it free() ?

Can anyone explain me.

Soundaryakumari .b said:   1 decade ago
free() : Releases the specified block of memory back to the system.

Sri said:   1 decade ago
What are the functions of malloc and calloc?

Krishna said:   1 decade ago
Both allocate storage memory but the difference is malloc process single argument so just specify storage space while calloc process double argument so specify no. Of variable and space needed for that variable.

Pokar sanjay said:   1 decade ago
How is different between malloc() and calloc() what is function of both? How it work?

Amrendra said:   1 decade ago
The free(var-name) is only function in c to deallocate memory.

Venkat said:   1 decade ago
Mainly free() function is used for allocating free memory for malloc() and calloc().

Hari naidu said:   1 decade ago
free() function is used to remove the allocated memory.

Anil kumar said:   1 decade ago
free() is one of the predefined function its free memory ...
only one function is there in c language to free memory....


Post your comments here:

Your comments will be displayed after verification.