C dynamic memory allocation and deallocation

Q.  C programming : Match the following:

a. calloc( )  ------- i. Frees previouslyallocated space.
b. free( ) ----------- ii. Modifiespreviouslyallocated space.
c. malloc( ) ------- iii. Allocates spacefor array.
d. realloc( ) ------- iv. Allocatesrequested size ofspace.

- Published on 19 Oct 15

a. a-iii, b-i, c –iv, d -ii
b. a-iii, b-ii, c –i, d -iv
c. a-iii, b-iv, c –i, d -ii
d. a-iv, b-ii, c –iii, d -i

ANSWER: a-iii, b-i, c –iv, d -ii
 

    Discussion

  • vallabh sanjay patil   -Posted on 02 Jan 24
    plese explain

Post your comment / Share knowledge


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)