Appinventiv interview question

What is singleton.Write the code . what is difference between frame and bounds? what is the difference between function and closure? what is core data?