Answer Posted / praviss
An existing block of memory which was allocated by malloc() subroutine, will be freed by free() subroutine. In case , an invalid pointer parameter is passed, unexpected results will occur. If the parameter is a null pointer, then no action will occur.
Where as the realloc() subroutine allows the developer to change the block size of the memory which was pointed to by the pointer parameter, to a specified bytes size through size parameter and a new pointer to the block is returned. The pointer parameter specified must have been created by using malloc(),calloc() or realloc() sub routines and should not deallocated with realloc() or free() subroutines. If the pointer parameter is a null pointer, then no action will occur.
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
What is and I oop mean?
What are the 4 main oop principles?
What is object and class in oops?
What is polymorphism and example?
What is class in oop with example?
What does <> mean pseudocode?
What is overriding in oop?
What is protected in oop?
What is stream in oop?
Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.
What is encapsulation in simple terms?
write a program that takes input in digits and display the result in words from 1 to 1000
Why is there no multiple inheritance?
What do you mean by Encapsulation?
What are the benefits of polymorphism?