Professional Documents
Culture Documents
Name: _______________________
Student #:
_________________
Signature: _____________________
Instructor: _______________
1.
2.
3.
4.
5.
Question
Max
6
5
5
4
20
10
Total
50
1
2
3
4
5
Mark
Page 2 of 7
Page 3 of 7
p
T
T
F
F
q
T
F
T
F
p
T
T
F
F
q
T
F
T
F
Page 4 of 7
b) Convert the following decimal number into binary: 42. Show your work.
Page 5 of 7
Page 6 of 7
Page 7 of 7
}
double foo( int a, double b )
{
printf("a = %i, b = %f\n", a, b);
a += 2;
return b 0.3;
printf("a = %i, b = %f\n", a, b);
}
Trace Table (be sure to trace all variables in the program):