C Programming - Structures, Unions, Enums - Discussion

Discussion Forum : Structures, Unions, Enums - General Questions (Q.No. 1)
1.
How will you free the allocated memory ?
remove(var-name);
free(var-name);
delete(var-name);
dalloc(var-name);
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
50 comments Page 4 of 5.

Chinnu said:   1 decade ago
free is the function it is use to allocated or removal of memory.

Sindhu said:   1 decade ago
What is difference between delete and free ?

V.S.Kaushik said:   1 decade ago
free(varname) is used to free the memory space.

Safi said:   1 decade ago
Delete means increase space but at that deleted location take over by next allocated data. Hence that memory address is not free permanently.

While free means at that location space for another data entry. This location is not fill without user sent data by taking that reference.

HARI said:   1 decade ago
Its just free the memory for the current use.

Vicky Mehta said:   1 decade ago
If delete the variable means that memory also free ?

Vishal said:   1 decade ago
We used the free () function to free dynamically allocated memory. Such as malloc () and alloc ().

And we use the delete for destroy an object.

Or another way we can say that for explicitly destroyed we used delet.

Vishal said:   1 decade ago
The heap is reason of free because of that our program can use memory via c's DYNAMIC ALLOCATION function.

But in delete() function asks the user to specify the index of the address that to be deleted.

MAREPPA said:   1 decade ago
What is the difference between free and delete ?

Raji said:   1 decade ago
What is the difference between free(var-name) & dalloc(var-name)?


Post your comments here:

Your comments will be displayed after verification.