Test your basic knowledge |

Objective C Programming Basics

Subjects : it-skills, apple
Instructions:
  • Answer 50 questions in 15 minutes.
  • If you are not ready to take this test, you can study here.
  • Match each statement with the correct term.
  • Don't refresh. All questions and answers are randomly picked and ordered every time you load a test.

This is a study tool. The 3 wrong answers for each question are randomly chosen from answers to other questions. So, you might find at times the answers obvious, but you will see it re-enforces your understanding as you take the test each time.
1. Consider: [NSString alloc]. 'alloc' is an example of a(n) class method rather than a _______ method






2. A class is said to do this when it declares that it implements all the methods in the protocol.






3. A class that's one step above another class in the inheritance hierarchy; the class through which a subclass inherits methods and instance variables.






4. A protocol that's declared with the @protocol directive. Classes can adopt these - objects can respond at runtime when asked if they conform to them and instances can be typed by those that they conform to.






5. Square bracket syntax for calling a method






6. To destroy an object set the variable that points to it to _____






7. A ____ ____ is a situation where you free memory and then accidentally continue to use it






8. The general type for any kind of object regardless of class; defined as a pointer to an object data structure; can be used for both class objects and instances of a class.






9. In object-oriented programming the object that is sent a message.






10. When creating a class implementation file you begin with the _____ keyword and close with the @end keyword






11. The process of setting or reading the value at an address pointed to by a pointer






12. In object-oriented programming the ability of different objects to respond each in its own way - to the same message.






13. Three main categories of more complicated data structures:_______ - arrays and structs






14. Property attribute where the setter stores the assigned value but does not perform any memory management.






15. An instance variable that points to another object; _____ instance variables are a way for an object to keep track of the other objects to which it may need to send messages.






16. In a home building analogy a ____ is the blueprint and the object is the house






17. A protocol declared as a category usually as a category of the NSObject class.






18. Objective-C borrows much of its syntax from ______ one of the earliest object-oriented languages






19. The name of a method when it's used in a source-code message to an object or the unique identifier that replaces the name when the source code is compiled.






20. Property attribute that causes the setter to store a strong reference to the assigned value






21. A programming unit that groups together a data structure (instance variables) and the operations (methods) that can use or affect that data; the principal building blocks of object-oriented programs.






22. Objective-C objects should use strong or weak ______






23. A language such as C that organizes a program as a set of procedures that have definite beginnings and ends.






24. Xcode sequence to examine an app for memory leaks or retain cycles






25. _____ allow you to add new methods to existing classes






26. Giving the compiler information about what kind of object an instance is - by typing it as a pointer to a class.






27. A class that's defined solely so that other classes can inherit from it. Programs don't use instances of this; they use only instances of its subclasses.






28. 3 Common Float data types: float - _____ - CGFloat






29. The 6 main categories of operators are: ____ - arithmetic - comparison - logical - bitwise and membership






30. The _____ function can be used to print a message to the console






31. Each class should have a ______ initializer a single method responsible for performing all of the object's setup and initialization.






32. In a format string the place holder for an object is ______






33. A message sent from one application to an object in another application.






34. All objects are created on the _____






35. Objective-C is a _____ of the C language






36. A set of method definitions that is segregated from the rest of the class definition.






37. An object that acts on behalf of another object.






38. A prototype for a particular kind of object; declares instance variables and defines methods for all members of the class.






39. If you are compiling an application with ARC (Automatic reference Counting) you _______ store Objective-C objects inside a struct






40. Initializer method traditionally begin with the _____ prefix






41. Property attribute that synthesizes accessors that are not thread safe






42. The init... method that has primary responsibility for initializing new instances of a class. Each class defines or inherits its own. Through messages to self other init... methods in the same class directly or indirectly invoke it and then it - thro






43. a+b; is an example of using a _____ operator






44. In object-oriented programming - the method selector (name) and accompanying parameters that tell the receiving object in a message expression what to do.






45. There are ____ fundamental building blocks in Objective-C






46. In object-oriented programming an expression that sends a message to an object. In the Objective-C language they are enclosed within square brackets and consist of a receiver followed by a message (method selector and parameters).






47. ____ provide a concise & elegant method for defining a discrete set of values






48. _____ operators take 2 operands






49. Placing a ____ before a normal variable name gives it's address






50. A programming technique that hides the implementation of an operation from its users behind an abstract interface; allows the implementation to be updated or changed without impacting the users of the interface.