InterviewSolution
| 1. |
Mention The Purpose Of Realloc ( )? |
|
Answer» The FUNCTION realloc (ptr,n) USES two arguments. The first ARGUMENT ptr is a pointer to a block of memory for which the size is to be altered. The SECOND argument n specifies the new size. The size may be increased or decreased. If n is greater than the old size and if sufficient space is not AVAILABLE subsequent to the old region, the function realloc ( ) may create a new region and all the old data are moved to the new region. The function realloc (ptr,n) uses two arguments. The first argument ptr is a pointer to a block of memory for which the size is to be altered. The second argument n specifies the new size. The size may be increased or decreased. If n is greater than the old size and if sufficient space is not available subsequent to the old region, the function realloc ( ) may create a new region and all the old data are moved to the new region. |
|