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
Why is oop useful?
What is polymorphism used for?
i am getting an of the type can not convert int to int *. to overcome this problem what we should do?
How many human genes are polymorphic?
What is difference between data abstraction and encapsulation?
Why do pointers exist?
is there any choice in opting subjects like 4 out of 7
Is data hiding and abstraction same?
Can we define a class within the interface?
What is inheritance in oop?
What is Difference Between Inheritance and creating object and getting data? means Class A extends B{ B.getMethod();} (OR) Class A{ b obj=new B(); obj.getMethod(); }
Why oops is important?
What is abstraction in oops with example?
What is the use of oops?
Explain the concepts involved in Object Oriented programming.