I was inspecting a used car and the oil and the transmission dipstick smelled of exhaust (carbon monoxide?). What does this mean? Does it mean that the engine's gone bad and I should stay away from that car?
First of all you're not smelling CO (carbon monoxide) as that is an odorless and colorless gas. What you are likely smelling are combustion byproducts and that is not at all uncommon in the engine oil. The transmission oil is another story and I suspect you are just smelling the oil itself.
The thing I'd be concerned about is a sharp "burnt" smell that indicates overheating or other heat-related issues.
Smelling AT fluid is (or did ) give a good hint of the transmission general condition , but it requires experience. The clutches and bands have material like brake pads and if they slip, they heat very quickly although running in oil , and have a "burned" smell.
If the motor oil has a distinct smell of exhaust fumes, it might also mean that the cylinder head gasket has become leaky. Transmission fluid should never smell of exhaust gases, but can get a certain burnt smell from the clutch pads.