C Programming - Structures, Unions, Enums - Discussion

1. 

How will you free the allocated memory ?

[A]. remove(var-name);
[B]. free(var-name);
[C]. delete(var-name);
[D]. dalloc(var-name);

Answer: Option B

Explanation:

No answer description available for this question.

Sathish said: (Sep 27, 2010)  
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.

M.Suman said: (Oct 7, 2010)  
I have one doubt.

If delete the variable means that memory also free ?

Prithvi said: (Dec 22, 2010)  
Itz correct..

Tejas said: (Jan 20, 2011)  
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.

Raki said: (Jan 21, 2011)  
Yes free is the in built functio in "c" language.

Arun said: (Jan 21, 2011)  
If we set the memory free...Will the variable get deleted ?

Karim said: (Feb 8, 2011)  
Clears the memory, correct.

free(void * block)

Free is used to deallocate the memory allocated by malloc, calloc.

Ashok said: (Jun 1, 2011)  
What is mean by malloc and calloc?

Prits said: (Jun 14, 2011)  
May I know then,

What is the difference between "free(var-name)" and "dalloc(var-name)"?

Yalamanda said: (Jun 30, 2011)  
free(); is the key word in stdio.h library which free the allocated by the variable given as argument.

Raji said: (Jul 13, 2011)  
What is the difference between free(var-name) & dalloc(var-name)?

Mareppa said: (Aug 14, 2011)  
What is the difference between free and delete ?

Vishal said: (Aug 29, 2011)  
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.

Vishal said: (Aug 29, 2011)  
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.

Vicky Mehta said: (Oct 13, 2011)  
If delete the variable means that memory also free ?

Hari said: (Dec 8, 2011)  
Its just free the memory for the current use.

Safi said: (Dec 30, 2011)  
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.

V.S.Kaushik said: (Jun 4, 2012)  
free(varname) is used to free the memory space.

Sindhu said: (Jul 10, 2012)  
What is difference between delete and free ?

Chinnu said: (Sep 11, 2012)  
free is the function it is use to allocated or removal of memory.

Kotteswari said: (Sep 14, 2012)  
free () is built in function of c language. This function used to clear the memory so it is correct.

Bhavani said: (Sep 20, 2012)  
Free allocated memory means it free variable.

Jiten said: (Oct 2, 2012)  
Yes, free() is a function which is used to deallocate the memory.

Free Allocated Memory Means It Free Variable. said: (Nov 11, 2012)  
Free allocated memory means it free variable.

V.Lakshminarayana said: (Dec 19, 2012)  
What is dalloc functionality in c?

Pavankumar said: (Jan 22, 2013)  
What is the functionality of remove (variablename)?

Rama said: (Jan 29, 2013)  
I have one doubt.

What is meant by dalloc (variable-name) ?

I think deletion of var-name means there allocated the memory.

Vendhan said: (Mar 8, 2013)  
free() is the built in function in C, when we want to remove the allocated space of variable (ex. like A is the variable) given the syntax free(a); the allocated space memory come out free.

Soujanya said: (Sep 6, 2013)  
How can we decide that its asked for deallocating the dynamically allocated memory?

As we use free to deallocate the dynamic memory allocation.

Amreen said: (Sep 22, 2013)  
free() is build in function in C in stdlib.h.

Hai said: (Sep 25, 2013)  
What is the difference between dalloc and free?

Ryt One said: (Sep 28, 2013)  
What is the difference in free and delete?

Sri said: (Oct 3, 2013)  
Hello friends, What is the difference b/w free(var-name); & dalloc(var-name); If you know the answer, Could you please send the answer.

Priya said: (Oct 4, 2013)  
Free the memory in the sense we can use for further use in the program. But if we delete we can't use it in the program if we want it.

Hai said: (Oct 5, 2013)  
What is meaning of free?

Papon said: (Nov 14, 2013)  
Free release the memory space occupied by the variable and the memory is available for further use on the other hand delete would delete the entire memory space occupied by the variable and the memory is not available for further use.

Alex said: (Jan 27, 2014)  
Free (var-name) used to free the memory which is occupied by that variable, but variable will be there and we can reuse it in our program.

But,
If if we can reuse it in our program again then it should occupies some memory.

Is there any one having some clearance. ?

Harika said: (Apr 16, 2014)  
What is the functionality of remove(var_name), dalloc(var_name)?

Prajwal Jain said: (May 8, 2014)  
The free() uses C as built in function so. It will free (release) the allocated memory.

Surekha said: (May 9, 2014)  
What about dalloc();?

As malloc is used for allocating memory.

What is the function of dalloc(); ?

Narasimham said: (Jul 26, 2014)  
What is meant of calloc?

Sindhuja said: (Aug 26, 2014)  
malloc, calloc, dalloc means? How does they differ each other?

Kayalvizhi Selvaraj said: (Oct 9, 2014)  
Here free() means releasing the memory, also dalloc() does. isn't it?

Nitish Dhok said: (Jul 9, 2015)  
If you allocate the memory using new then you should deallocate using delete and if you allocate the memory using malloac then you must deallocate is using free.

Roger said: (Sep 12, 2015)  
By Using Free-Var, you get random memory allocation.!

Kartheek said: (Aug 12, 2016)  
Using free.

Void free(void * ptr);

Vasu said: (Oct 11, 2016)  
free in place of using realloc. realloc(*ptr,0) this function is also deleted memory space in heap section.

Rashmi said: (Oct 27, 2016)  
Dealloc does not exist.

Only malloc, calloc, realloc and free are the methods of dynamic memory allocation.

Mohamed Mosad said: (Apr 13, 2017)  
To be more specific we shall say,

free(pointer_to_dynamically_allocated_area).

Sourav said: (Feb 2, 2022)  
I have one doubt, why not dalloc (var-name)? Please explain.

Post your comments here:

Name *:

Email   : (optional)

» Your comments will be displayed only after manual approval.