top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

How the memory is allocated to argument of function ?

+4 votes

Means, at the time of calling the function , local variable get memory first OR argument ?

posted Oct 23, 2013 by Anuj Yadav

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

2 Answers

+1 vote
answer Oct 23, 2013 by Vikas Upadhyay
+1 vote

As vikas pointed out call_stack is used for this purpose. Every process/program has a stack segment which creates an entry on every function call which contains the following in the given order
1. Arguments
2. Return Address
3. Local Variables

Source: Wiki

So obvious argument are created first...

answer Oct 23, 2013 by Sheetal Chauhan
Similar Questions
Contact Us
+91 9880187415
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Karnataka INDIA.