CSE 142 Quiz 5
July 20th, 2000

Name:
SID:

Answer the following questions:

1) What does the following code output?

int fiddle(int foo, int *bar){
	int temp;

	temp = foo;
	foo = *bar;
	*bar = temp;

	return temp;
}

int main(void){
	int a = 7, b = 3, c = 12;

	a = fiddle(b, &c);
	printf("a: %d\n", a);
	printf("b: %d\n", b);
	printf("c: %d\n", c);

	return 0;
}


a: 3
b: 3
c: 3