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. Short for mutual exclusion semaphore. An object used to synchronize thread execution.






2. C-style strings always end with a ____ character






3. A technique used in C-based languages where the operating system provides memory to a running application as it needs it instead of when it launches.






4. Procedures (like verbs) are processes that manipulate or transform data and in Objective-C these 3 elements are _____ - functions and methods






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






6. A memory-management technique in which each entity that claims ownership of an object increments the object's reference count and later decrements it; allows one instance of an object to be safely shared among several other objects.






7. A compiler feature that provides automated memory management






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






9. Square bracket syntax for calling a method






10. Rather than using arrays in Objective-C we often are able to use it's collection classes of NSArray - NSSet and NSDictionary with _____ for strings






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






12. An object id with a value of 0.






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






14. 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.






15. Pointers are declared by placing a(n) ___ between the type declaration and the variable name






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






17. Any class that's one step below another class in the inheritance hierarchy.






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






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






20. Discovering the class of an object at runtime rather than at compile time.






21. Consider: [NSString alloc]. 'alloc' is an example of a(n) class method rather than a _______ method






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






23. _____ is one of the main advantages of object-oriented code and allows objects to 'hide away' much of their complexity operating at times like a proverbial 'black-box'.






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






25. The part of an Objective-C class specification that defines public methods (those declared in the class's interface) as well as private methods (those not declared in the class's interface).






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






27. Symbol used to denote a placeholder in a format string






28. A logical subdivision of a program within which all names must be unique. Symbols in one do not conflict with identically named symbols in another.






29. All objects are created on the _____






30. A _______ method is one that is likely to be unsupported in the future. It's use should be discontinued.






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






32. Any variable that's part of the internal data structure of an instance; declared in a class definition and become part of all objects that are members of or inherit from the class.






33. C-style strings are stored in an array of _____






34. ______ operators take a single operand






35. In object-oriented programming a procedure that can be executed by an object.






36. a++; is an example of using a _____ operator






37. Data (like nouns) represent the information we are processing and in Objective-C this made up of the four elements of C types - _____ - enums and objects






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






39. Any method that can be used by an instance of a class rather than by the class object.






40. The Objective-C runtime table that contains entries that associate method selectors with the class-specific addresses of the methods they identify.






41. In Objective-C floats are more commonly used than ______






42. Initializer method traditionally begin with the _____ prefix






43. 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.






44. Protocols are adopted by adding a ____________ list of protocols inside angled brackets after the superclass declaration in a class's @interface block






45. The part of an Objective-C class specification that declares its public interface which includes its superclass name & instances variables and public-method prototypes.






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






47. 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.






48. 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.






49. 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.






50. Property attribute that synthesizes both a getter and setter for the property