Reputation: 788
int f(int a, int b){
return a+b;
}
int main(){
f(1,2);
}
In this example, when calling function f
, there is not a specific variable storing the addition result of a
and b
. My question is: where will the result of a+b
be stored?
Upvotes: 1
Views: 308
Reputation: 314
it will be moved to a temporary registers.
it will load the values, then call f(int,int)
take a look to the disassembly:
Upvotes: 2