Which of the following option is not true ?

Which of the following option is not true ?

Local variables can not be retained once activation record ends in the case of Stack.

In call by reference, actual parameter changes if there is any change in formal parameter.

In Heap, allocation and deallocation can be done in any order.

For heap management, Best Fit technique is used in the 'C' language.

vantaku saikumar @saikumar789
21 Jan 2017 12:27 pm

can anybody explain?

Ujjwal Singh @ujjwal10
2 Feb 2017 11:59 pm

Yeah sure! Worst Fit Technique is used here for better space usage in case of variable partitioning. Worst case also prevents external fragmentation to a great extent due to non-contiguous memory allocation. Variable partition is done generally during runtime & heap is used for dynamic(runtime) allocation. Hope you understood. 

Lovely @cse23
3 Feb 2017 12:26 am

first fit is used