Explain differences between alloc() and free()?



Explain differences between alloc() and free()?..

Answer / Ashish Kumar Gupta

In C and C++, malloc() is used to dynamically allocate memory, while free() is used to deallocate memory that was previously allocated with malloc(). Alloc() is not a standard function in these languages.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

What is the use of function pointer?

1 Answers  


Is python written in c or c++?

1 Answers  


What are the benefits of pointers?

1 Answers  


when can we use virtual destructor?

7 Answers   HCL, HP, Virage Logic,


How do you clear a buffer in c++?

1 Answers  


Is c++ a good beginners programming language?

1 Answers  


What is the difference between mutex and binary semaphore?

1 Answers  


Write a program that will count the number of digits in an input integer up to value MAX_VALUE (2147483647). Thus, for an input of 5837 the output should be 4 digits Make sure that your program works for the numbers 0, 1, and 10. For the number 0, the output should be 1 digit

2 Answers  


Is c++ still in demand?

1 Answers  


How a macro differs from a template?

1 Answers  


What is a pointer how and when is it used?

1 Answers  


What is the real purpose of class – to export data?

1 Answers  


Categories