What is realloc() and free()? What is difference between them?
Answer Posted / hrpynux@gmail.com
The free subroutine frees a block of memory previously allocated by the malloc subroutine. The realloc () function is used to allocate memory and has the following prototype: void * realloc (void * ptr, unsigned int num);
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Is facebook written in c++?
How should a contructor handle a failure?
What is c++ mutable?
Write a program which employs Recursion
How do you clear a set in c++?
Why was c++ created?
Am studying basic c++ programming, have been given the following assignment. Design a linear program to calculate the maximum stress a material can withstand given a force and a diameter of a circle. To find the required area pi should be defined. Have most of the program sorted out but am at a loss as to how to show the calculations required. Can anyone help?
Explain the advantages of using friend classes.
What are the advantage of using register variables?
What is a down cast?
Write a function to perform the substraction of two numbers. Eg: char N1="123", N2="478", N3=-355(N1-N2).
Write a Program for dynamically intialize a 2 dimentional array. Eg:5x20, accept strings and check for vowels and display the no.finally free the space allocated .
Can c++ be faster than c?
What is stream and its types in c++?
How can we read/write Structures from/to data files?