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
can we make game by using c
• What are the desirable attributes for memory managment?
Why is abstraction needed?
Why multiple inheritance is not possible?
#include
can inline function declare in private part of class?
What is for loop and its syntax?
Why is there no multiple inheritance?
write a code for this. serial_number contained in the header of the file will be read , if this serial number is less than a previous serial number within a successfully processed file, or is the same as another serial number within a successfully processed file, or if the field contains anything other than 7 digits, then the file must error with the reason ‘Invalid SERIAL_NUMBER’.
What is the real time example of inheritance?
Explain the advantages of inheritance.
Can destructor be overloaded?
What is abstraction in oop?
What is overriding vs overloading?
What is constructor overloading in oop?