answer for second one would be : The phone is devised in a such way that when it is turned off alarm still rings If you consider the age of Iphone etc then the appropriate answer is : The phone is programmed in such a way that its alarm still rings when it is switched off.