3 votes 3 votes When a function is recursively called, all automatic variables : are initialized during each execution of the function are retained from the last execution are maintained in a stack are ignored Programming in C runtime-environment + – Sanjay Sharma asked Jun 9, 2016 Sanjay Sharma 12.7k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 5 votes 5 votes When a function is recursively called, all automatic variables are initialized during each execution of the function. ManojK answered Jun 9, 2016 • selected Jun 9, 2016 by Arjun ManojK comment Share Follow See all 10 Comments See all 10 10 Comments reply Show 7 previous comments ManojK commented Jul 16, 2016 i edited by ManojK Jul 16, 2016 reply Follow Share See dear i meant here when call starts all the automatic variable which are initialized in stack and de-allocated when the call ends or you can say A new copy, with its value initially undefined, is made for each new call. .They are not maintained after the call ends. 0 votes 0 votes himanich commented Jul 16, 2016 reply Follow Share I agree with your statement ,but I don't understand the meaning of automatic variables .are they special kind of variables ? 0 votes 0 votes ManojK commented Jul 16, 2016 reply Follow Share Variable are named differently as a point of occurrence in the program.So automatic variable is used here because of they are occurring inside function . For more info you can check here Variable 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes All the local variables that are bounf to executes in its activation records will need freash allocation each and every time. So local variables inside the each activation records needs freash allocation. Paras Nath answered Oct 15, 2016 Paras Nath comment Share Follow See 1 comment See all 1 1 comment reply Ram Swaroop commented Aug 18, 2019 reply Follow Share If variable is static it retained it's updated value in different function calls. 0 votes 0 votes Please log in or register to add a comment.