C Programming - Structures, Unions, Enums - Discussion
Discussion Forum : Structures, Unions, Enums - General Questions (Q.No. 1)
1.
How will you free the allocated memory ?
Discussion:
50 comments Page 3 of 5.
Kartheek said:
9 years ago
Using free.
Void free(void * ptr);
Void free(void * ptr);
Vasu said:
9 years ago
free in place of using realloc. realloc(*ptr,0) this function is also deleted memory space in heap section.
Rashmi said:
9 years ago
Dealloc does not exist.
Only malloc, calloc, realloc and free are the methods of dynamic memory allocation.
Only malloc, calloc, realloc and free are the methods of dynamic memory allocation.
Mohamed Mosad said:
8 years ago
To be more specific we shall say,
free(pointer_to_dynamically_allocated_area).
free(pointer_to_dynamically_allocated_area).
Sourav said:
4 years ago
I have one doubt, why not dalloc (var-name)? Please explain.
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.
But in delete() function asks the user to specify the index of the address that to be deleted.
M.suman said:
1 decade ago
I have one doubt.
If delete the variable means that memory also free ?
If delete the variable means that memory also free ?
Prithvi said:
1 decade ago
Itz correct..
Tejas said:
1 decade ago
free(referred location name);
free() - built in function to free or clear the memory space. If you use free, the referred memory location released for the future use or other operations.
free() - built in function to free or clear the memory space. If you use free, the referred memory location released for the future use or other operations.
Raki said:
1 decade ago
Yes free is the in built functio in "c" language.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers