Which sentence contains a misplaced or dangling modifier?
A.Tired of waiting for someone to come to the door, the cat lay down and went to sleep.
B.To work in a library, a training course must be passed.
C.Learning to cook is well worth the time spent.
D.Some people might not like a quiet life with few surprising events.