If the variable ‘i’ has been declared in global, then the address of 'i' will be in the data section. If it is a local or auto variable, then the address will be in stack.
Next, 'j' is a local variable. Thus the address will always be in stack. However the value of j, i.e. the pointer, should point to a location in heap. It is the address returned by new/malloc().
You have viewed 1 page out of 248. Your C learning is 0.00% complete. Login to check your learning progress.
Similar topics related to this section
memory model, near, far and huge pointer, typed pointers and void pointer, sizeof void and void pointer, operators for void pointer, address of local and dynamic variable, malloc vs calloc, NULL pointer, enum type,
C Programming Language (Prentice Hall Software)
Let Us C Paperback - 2006 by Yashavant Kanetkar
Understanding and Using C Pointers Core techniques for memory management
Data Structures Using C and C++ Paperback - 1998
Data Structures In C Paperback - August 11, 2008 by Noel Kalicharan