A function is running, it has its own stack pointer, memory area now it invokes another function from this point what changes will be in its memory area and what other changes in data segment, stack segment, heap segment. I want a complete picture of memory architecture?

Submitted by: Administrator
There will be a lot of changes in fact. First of all, all the variables the function was suing needs to be pushed into the stack. (we need all these variables when we return from the other function). The Program counter will be pushed to stack too... (When the "return" of second function occurs we should know where to 'return' to)These are the basics which are bound to happen when a function calls another.
Submitted by: Administrator

Read Online Programming Concepts Job Interview Questions And Answers