How does free() know how many bytes to free?

Answer Posted / sekhar

free takes the pointer variable as argument. The intial
data at that location holds a value of number of bytes that
pointer is pointing to. Based on that information, it frees
the memory.

Is This Answer Correct ?    9 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?

15543


What is an auto keyword in c?

656


Given a valid 24 hour format time find the combination of the value and write a program ,do not hard the value and if any other inputs provided should work with the logic implemented Input: 11:30 Output: 13:10 Input: 18:25 Output: 21:58

1130


What are the advantages of union?

639


What is scope rule in c?

618






What is a lookup table in c?

641


c program to compute AREA under integral

1829


Can we compile a program without main() function?

641


Do you know pointer in c?

599


What are the properties of union in c?

602


Explain what is the difference between #include and #include 'file' ?

593


What does a pointer variable always consist of?

676


Do character constants represent numerical values?

856


What are pointers in C? Give an example where to illustrate their significance.

758


Implement bit Array in C.

685