Example: int f(int &a, int y);q = f(y, s); push s
1. (1 pt) void f1(void);
f1();
2. (2 pt) void f2(int a);
f2(4);
3. (3 pt) int f3(int a);
x = f3( p);
4. (3 pt) int f3(int &a);
y = f3( z );
5. (3 pt) int f5(int a, int b, int &c);
x = f5( z, q, y);
Example: int f( int &a, int y) { f proc near
return a+y; push ebp
} mov ebp, esp
mov eax, [ebp+12]
mov ebx, [ebp+8]
add eax, [ebx]
pop ebp
ret
f endp
6. (2 pt) void f1(void) {
7. (3 pt) void f2(int &a) {
cout << a;
}
8. (3 pt) int f3(int a) {
return a*a;
}
9. (3 pt) int f3(int &a, &b) {
return a+b+a;
}
10. (4 pt) int f5(int a, int &b, int c);
return a*b-c;
}