Final answer:
A smoke detector must be located approximately 4 inches from the ceiling if it is installed on a sidewall.
Step-by-step explanation:
If a smoke detector must be installed on a sidewall, the top of the detector must be located approximately 4 inches from the ceiling.
This is because smoke rises, and locating the smoke detector closer to the ceiling ensures that it can detect smoke effectively.