This questions is based on the recursive function with call by value concept and all local variable in the function.
NOTE: For each function separate copy of it's local variable is maintained by compiler before transferring call to next function.
Try to understand with the easy technique to solve this types of questions. First gives the number to all important lines of function as shown in figure. Then start with first function call as shown in below figure. Maintain the separate copy of local variables for each function call as shown in below figure. Then execute function line by line as per number given by you as shown in above figure. Execute one by one line as shown in below figure and whenever function call is there transfer the control to next function. When function return or complete (execute last line) it return to the function from where it gets called.
This questions is based on the recursive function with call by value concept and local and static variable in the function.
NOTE: For each function separate copy of it's local variable is maintained by compiler before transferring call to next function while global single copy of static variable is maintained by compiler which is accessed by all functions.
Try to understand with the easy technique to solve this types of questions. First gives the number to all important lines of function as shown in figure. Then start with first function call as shown in below figure. Maintain the separate copy of local variables for each function call as shown in below figure. For static variable create only single copy which gets accessed by all function as shown in below figure with variable k. Then execute function line by line as per number given by you as shown in above figure. Execute one by one line as shown in below figure and whenever function call is there transfer the control to next function. When function return or complete (execute last line) it return to the function from where it gets called.
This questions is based on the recursive function with call by address concept and local and static variable in the function.
NOTE: For each function separate copy of it's local variable is maintained by compiler before transferring call to next function while global single copy of static variable is maintained by compiler which is accessed by all functions. in call by address, when we dereference the pointer variable in function, it refer to the variable whose address is passed during function call.
Try to understand with the easy technique to solve this types of questions. First gives the number to all important lines of function as shown in figure. Then start with first function call as shown in below figure. Maintain the separate copy of local variables for each function call as shown in below figure. For static variable create only single copy which gets accessed by all function as shown in below figure with variable k. Then execute function line by line as per number given by you as shown in above figure. Execute one by one line as shown in below figure and whenever function call is there transfer the control to next function. When function return or complete (execute last line) it return to the function from where it gets called.
This questions is based on the recursive function with call by value concept and all local variable in the function.
NOTE: For each function separate copy of it's local variable is maintained by compiler before transferring call to next function.
Try to understand with the easy technique to solve this types of questions. First gives the number to all important lines of function as shown in figure. Then start with first function call as shown in below figure. Maintain the separate copy of local variables for each function call as shown in below figure. Then execute function line by line as per number given by you as shown in above figure. Execute one by one line as shown in below figure and whenever function call is there transfer the control to next function. When function return or complete (execute last line) it return to the function from where it gets called.
This questions is based on the recursive function with call by value concept and local and static variable in the function.
NOTE: For each function separate copy of it's local variable is maintained by compiler before transferring call to next function while global single copy of static variable is maintained by compiler which is accessed by all functions.
Try to understand with the easy technique to solve this types of questions. First gives the number to all important lines of function as shown in figure. Then start with first function call as shown in below figure. Maintain the separate copy of local variables for each function call as shown in below figure. For static variable create only single copy which gets accessed by all function as shown in below figure with variable k. Then execute function line by line as per number given by you as shown in above figure. Execute one by one line as shown in below figure and whenever function call is there transfer the control to next function. When function return or complete (execute last line) it return to the function from where it gets called.
great questions help in clearing doubts. please update more ….thank you from bottom of my heart
Thank You Shivam Sharma. Please share this among all your friends. We are working on adding more questions as MOCK test.