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