- Joined
- 5/27/09
- Messages
- 106
- Points
- 28
1.
The mass of a ripe tomato is composed 99% of water and 1% of other stuff. You put 100 pounds of ripe tomatoes out in the sun. After a while evaporation changes the composition to 98% water and 2% other stuff. At this time, how much do the tomatoes weigh, in pounds?
a) 98
b) 49
c) 50
d) 49.5
2.
A factory recycles and re-manufactures all the paper cups it uses in its cafeteria. It can make one new cup out of 9 used ones. If it currently has 505 used cups, how many re-manufactures cups can be used before externally produced ones are needed?
a) 57
b) 56
c) 65
d) 63
3.
Assume that all cows graze at the same rate. If three cows could graze in a field for a three days until all grass is eaten up, and two cows could graze in the same field for six days, how many days could one cow graze in the field and finish off all the grass? Do not forget that grass keeps growing!
a) 24
b) 21
c) 27.5
d) Forever!
4.
Strictly speaking, which is the simplest correct C program?
A)
main()
{
}
B)
main()
{
return 0;
}
C)
main()
{
exit(0);
}
a) A only
b) B only
c) C only
d) B and C
5.
What would be the preferred macro definition for the absolute value function?
a) #define abs (x) x>0?x:-x
b) #define abs (x) (x)>0?(x)
-x)
c) #define abs (x) ((x)>0?(x)
-x))
d) #define abs (x) (((x)>0?(x)
-x)))
The mass of a ripe tomato is composed 99% of water and 1% of other stuff. You put 100 pounds of ripe tomatoes out in the sun. After a while evaporation changes the composition to 98% water and 2% other stuff. At this time, how much do the tomatoes weigh, in pounds?
a) 98
b) 49
c) 50
d) 49.5
2.
A factory recycles and re-manufactures all the paper cups it uses in its cafeteria. It can make one new cup out of 9 used ones. If it currently has 505 used cups, how many re-manufactures cups can be used before externally produced ones are needed?
a) 57
b) 56
c) 65
d) 63
3.
Assume that all cows graze at the same rate. If three cows could graze in a field for a three days until all grass is eaten up, and two cows could graze in the same field for six days, how many days could one cow graze in the field and finish off all the grass? Do not forget that grass keeps growing!
a) 24
b) 21
c) 27.5
d) Forever!
4.
Strictly speaking, which is the simplest correct C program?
A)
main()
{
}
B)
main()
{
return 0;
}
C)
main()
{
exit(0);
}
a) A only
b) B only
c) C only
d) B and C
5.
What would be the preferred macro definition for the absolute value function?
a) #define abs (x) x>0?x:-x
b) #define abs (x) (x)>0?(x)

c) #define abs (x) ((x)>0?(x)

d) #define abs (x) (((x)>0?(x)
