tags:

views:

75

answers:

3
int test (int integer ){
    int results =0 ;
    results = 10 - integer;
    printf("%d \n", &integer);
    return results;
}


void main(){
    printf("%d \n", test(1));

}
A: 

Google will lead you to Wikipedia, which in turn will give you the background needed to answer your question.

Bob Murphy
+2  A: 

Activation records / stack frames are dependent on both the architecture and the platform. That said, a vaguely generic one would look like

+----------------+
| integer        |
+----------------+
| return address |
+-----------------
| link pointer   |
| (aka saved     |
| base pointer   |
+----------------+
| results        |
+----------------+

There could be other things in there as well such as saved registers but this should give you a rough idea.

R Samuel Klatchko
A: 

Consult the Dragon Book.

Amit