Would a glass of water in space freeze or boil?
If cold is simply the absence of heat, i.e., the absence of rapidly moving molecules of water or air, then how come vacuum-packed canned food doesn't come out frozen, or at least very cold? And then if you walked a hundred feet out of your spaceship with a glass of water, would the water freeze because of the vacuum, or would it boil since there's no air pressure or barometric pressure to overcome?
Christ Almighty, Barry, you're asking for a short course in thermodynamics. Don't you guys want to know about Neil Sedaka anymore?
Let's clear up a couple misconceptions to start with. First, your idea that cold is "the absence of rapidly moving molecules of water or air" is a bit confused. Cold refers to very slow-moving molecules of anything, whether water, air, or Eskimo Pies. If you have no molecules at all, the concept of temperature is meaningless. That's why it's technically incorrect to speak of the "cold of outer space"--strictly speaking, space has no temperature, period. (On the other hand, space will make objects that are floating around in it cold--in some cases, very cold. Space is what's known as a "temperature sink," meaning it sucks heat out of things. But we'll get back to this in a minute.)
Second, a vacuum never causes water to freeze; it causes water to boil. As air pressure decreases, so does boiling point. That's why water boils much faster on a mountaintop than it does at sea level. By the same token, you can make water boil at room temperature in the laboratory by applying a partial vacuum.
Now then. The contents of an earthbound vacuum-packed can do not freeze because they're in contact with the sides thereof--they absorb room heat by conduction. There is no room heat in space, though, so the temperature of a solid object floating in the void consists of the difference between the heat the object absorbs from the sun and the internal heat it radiates away. This temperature is dependent on such things as the reflectance of the object's surface, its shape, mass, orientation toward the sun, and so on.
Polished aluminum will absorb sufficient heat to raise its temperature as high as 850 degrees Fahrenheit; certain types of white paint, on the other hand, absorb so little heat that their temperature may not get much above -40 Fahrenheit, even in full sunlight. Parts of the space shuttle get down to -180 to -250 degrees Fahrenheit.
Theoretically, the temperature of an object in deep space could get down pretty close to absolute zero, -460 degrees Fahrenheit. But even in the middle of nowhere there's enough in the way of stray particles and radiation to heat thing up to 3 degrees Kelvin--that is, the equivalent of 3 degrees Celsius (5 degrees F) above absolute zero.
Finally, we have the question of liquids in space. In a vacuum most liquids have such a low boiling point that they vaporize almost instantly. For that reason, most substances exist in space in either the gaseous or the solid state. When the astronauts take a leak while on a mission and expel the result into space, it boils violently. The vapor then passes immediately into the solid state (a process known as desublimation), and you end up with a cloud of very fine crystals of frozen tinkle. It is by such humble demonstrations that great scientific truths are conveyed.