You cannot switch off an alarm device to get rid of the alarm signal, the alarm device will get back to its basic functioning only after the cause of the alarm has disappeared.
For Smoke-alarms the smoke has to be vanished, for Heat-alarms the temperature has to drop and for Carbon-monoxide-alarms the CO level has to drop below a certain level.However, you can de-activate an alarm device with a fixed battery: see answer above.