• 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

 

 

NEXT ILLUSTRATION:

Q - Consider the C code:

Int main()

{

Int x=3;

Fun(x);

Return 0;

}

 

Void Fun(int n)

{n--;

If (n!=0)

{

Fun(n);

}}

Explain the allocation of memory in stack for the above program.

Ans: firstly a frame in stack is created and memory is allocated to store variable x with value 3.

 www.exploreroots.com

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