0 votes 0 votes Heap Storage Allocation "SUPPORT RECURSION OR NOT"?? pream sagar asked Jun 20, 2018 pream sagar 228 views answer comment Share Follow See all 3 Comments See all 3 3 Comments reply srestha commented Jun 20, 2018 reply Follow Share no, not support recursion how far I remember recursion supports static storage allocation but heap support dynamic memory allocation 2 votes 2 votes Anand. commented Jun 20, 2018 reply Follow Share yes srestha you are correct! For recursion,function should be pushed in a specific order(i.e LIFO order) which can be done by stack while heap does not follow specific order,it simply allocates memory(dynamic memory allocation) wherever /whenever there is memory. 1 votes 1 votes Deepanshu commented Nov 18, 2018 reply Follow Share srestha mam recusion also dyanmic as we dont know which memory next as one function then other and functions not in sequence dyanmic means providing memory at run time and we know this at run time how much space and how much function calls it made ... static see like array its memory is fixed througout program.....we cant delete it but recursion memory done after after calling that function if i am wrong somehere plzz correct me 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes No,heap storage allocation does not support recursion .Actually heap storage allocation support dynamic data structures. Anil Ji answered Jun 20, 2018 Anil Ji comment Share Follow See all 0 reply Please log in or register to add a comment.