Q- How are variables accessed within a frame in the stack? Ans: Well as there is a pointer known as stack pointer to manage different operations on stack, the same way there is a frame pointer to access different variables with a frame. The stack pointer points to the top of the stack while the […]
Tag: stack
Q2: Memory Allocation
Consider the C code: Now we have to picturize the whole scenario in HEAP and STACK memory. Ans: We have no dynamically allocated variables in this program. Hence there is not much role of HEAP memory. We analyze the memory allocation and de-allocation in STACK on next page. We know stack memory is used to […]
Program Memory – Introduction
This article is very important for the person who wants to understand c language. Anyone who is going for any interview for a good software company must read the following article as the questions asked in the tests and interviews need the candidate to be clear in the following concepts. This article would ensure that […]