11-05-2011, 05:05 PM
Whenever we call a function, the compiler makes a stack that it uses to fulfill this function call. After the compiler puts the entries on the stack, the top (i.e. first entry in the stack) contains the return address of the function where the control will go back after executing the function. The next entries on the stack are the arguments of the function. The compiler pushes the last argument of the call list on the stack. Thus the last argument of the call list goes to the bottom of the stack. This is followed by the second last argument of the call list to be pushed on the stack. In this way, the first argument of the call list becomes the first element on the stack. Now in the end return address is pushed on the stack. So top of the stack will point to the return address.
0300-9520262
Get solution in 24 hour |cpmputer & internet
mileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
