• Home
  • Tutorials
  • Interviews
  • Info Seed
  • Forums
  • Projects
  • Links
  • Contact Us
C Language
C POINTERS
MEMORY MANAGEMENT
INTRODUCTION
FIXED MEMORY
STACK MEMORY
HEAP MEMORY
Illustration with simple program
Functions to manage HEAP MEMORY
MEMORY ALLOCATION
MEMORY ALLOCATION-II
MEMORY ALLOCATION-III
MEMORY ALLOCATION-IV
Illustrations of MEMORY ALLOCATION
Illustration I
Illustration-I Contd..
Illustration-I Contd..
Illustration-I Contd..
Illustration II
Illustration-II Contd..
Illustration-II Contd..
Illustration III
Illustration IV
FRAME POINTER

 

 

 

MEMORY ALLOCATION-ILLUSTRATION-IV

Now value of p is printed and 3 gets returned and stored in variable k in function func2.

 

www.exploreroots.com

After this value of k gets printed and value 7 is returned. The function func2 returns to main and 7 gets stored in x.

www.exploreroots.com

After this value of x is printed and program ends. And hence the whole stack is de-allocated and even global variable ‘a’ is de-allocated.

 

www.exploreroots.com

 

previous next
| Copyright © 2009 exploreroots- All Rights Reserved | Disclaimer |