40 votes 40 votes In the C language: At most one activation record exists between the current activation record and the activation record for the main The number of activation records between the current activation record and the activation records from the main depends on the actual function calling sequence. The visibility of global variables depends on the actual function calling sequence Recursion requires the activation record for the recursive function to be saved in a different stack before the recursive function can be called. Programming in C gatecse-2002 programming programming-in-c easy descriptive + – Kathleen asked Sep 15, 2014 • edited Jun 15, 2018 by Milicevic3306 Kathleen 10.2k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 95 votes 95 votes Each function call starts a new activation record and since C allows nested function calls more than one activation record can exist between the current activation record and main. TRUE Since, C uses static scoping, the actual function calling sequence has no impact on the visibility of global variables. If a variable is not found in the current activation record, it is looked in global address space and this is independent of the calling sequence. All function calls- whether recursive or not uses the same stack for saving the activation record. There is no need for a different stack as for C compiler a recursive function call and a normal function call make no difference. Arjun answered Dec 1, 2014 • edited Aug 4, 2018 by Manoja Rajalakshmi A Arjun comment Share Follow See all 7 Comments See all 7 7 Comments reply Show 4 previous comments talha hashim commented Aug 21, 2018 reply Follow Share puja mam u r great, always provide important informations 0 votes 0 votes samarpita commented Jun 25, 2022 reply Follow Share @Arjun @Sachin Mittal 1 @Shaik Masthan sir in C “since C allows nested function calls” but sir C doesn’t allow nested function calls “We cannot define a function within another function in standard C.We can declare a function inside of a function, but it's not a nested function.”https://stackoverflow.com/questions/2608158/nested-function-in-c here it is told.We can see option A like this,C(){}B(){ C();}A(){ B();}main(){ A();}So if the current activation record in the stack is C(). So between the activation record of C() and main() ...there is activation record of A() and B().@shishir__roy plz see this 1 votes 1 votes shishir__roy commented Jun 25, 2022 reply Follow Share @samarpita we're taking about nested function calls and not nested function definitions. nested function call means calling one function from another function. Your counter example to option A seems correct to me. 1 votes 1 votes Please log in or register to add a comment.