edited by
464 views
0 votes
0 votes
Which among the following is (are) able to modify previously allocated space

I. calloc()                 II. free()          III. realloc()             

A. Both II and III

B. I , II and III

C. III only

D. II only
edited by

1 Answer

Best answer
1 votes
1 votes

I. calloc() allocates the desired memory space, initializes it to 0 and the returns a pointer to the first byte of allcated space.
II. free() deallocates the previously allocated space.
III. realloc() is used to change the size of previously allocated space.

Hence, answer should be C.

selected by

Related questions

1 votes
1 votes
1 answer
1
Mrityudoot asked Feb 2
255 views
In what cases does an uninitialized array have values = 0 and for which cases does it have values = garbage values. How to differentiate?
0 votes
0 votes
0 answers
4
srestha asked Jul 17, 2018
174 views
What is "indexed scheme of blocks to a file"?Is it work same as multilevel page table?