The correct option is B Near or on the ceiling
The National Fire Prevention Association (NFPA) states that the best location for a smoke detector is on the ceiling near a doorway or stairway. As fire burns, the smoke rises and seeks the easiest route of escape. You should also have a smoke detector on the hallway ceiling outside of bedrooms.