Tuesday, 12 May 2015

Q24,paper 3,J12. The _______ memory allocation function modifies the previous allocated space.


Options (A) calloc( ) (B) free( ) (C) malloc( ) (D) realloc( )
Answer (D) Realloc().
Explanation.
malloc()----- Allocates requested size of bytes and returns a pointer to the first byte of allocated space.
calloc()------ Allocates space for an array elements, initializes to zero and then returns a pointer to memory.
free()------ dellocate the previously allocated space.
realloc()--------Change the size of previously allocated space

No comments:

Post a Comment

Note: only a member of this blog may post a comment.