SUBJECTS
|
BROWSE
|
CAREER CENTER
|
POPULAR
|
JOIN
|
LOGIN
Business Skills
|
Soft Skills
|
Basic Literacy
|
Certifications
About
|
Help
|
Privacy
|
Terms
|
Email
Search
Test your basic knowledge |
Objective C Programming Basics
Start Test
Study First
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. _____ 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'.
selector
Encapsulation
pointers
message expression
2. Discovering the class of an object at runtime rather than at compile time.
remote object
memory leak
cycles
dynamic typing
3. Property attribute that synthesizes accessors that are not thread safe
informal protocol
strong
cycles
nonatomic
4. Created by the compiler - lacks instance variables and can't be statically typed but otherwise behave like all other objects. As the receiver in a message expression - a it is represented by the class name.
synchronous message
9
class object
properties
5. Three main categories of more complicated data structures:_______ - arrays and structs
pointers
weak
remote object
Edit>Refactor>Convert to Objective-C ARC
6. The part of an Objective-C class specification that declares its public interface which includes its superclass name & instances variables and public-method prototypes.
event
interface
method
attributes
7. A remote message that doesn't return until the receiving application finishes responding to the message. Because the application that sends the message waits for an acknowledgment or return information from the receiving application - the two applica
init
synchronous message
class
AppKit
8. When creating a class implementation file you begin with the _____ keyword and close with the @end keyword
asterisk (*)
@implementation
init
mutex
9. Objective-C objects should use strong or weak ______
zero
attributes
square brackets
Interface Builder
10. In object-oriented programming the ability of different objects to respond each in its own way - to the same message.
abstract superclass
class
polymorphism
null
11. The _____ function can be used to print a message to the console
abstract class
Enumerations
printf( )
distributed objects
12. Each class should have a ______ initializer a single method responsible for performing all of the object's setup and initialization.
designated
inheritance
abstract class
polymorphism
13. Finding the method implementation to invoke in response to the message
dynamic binding
C operators
init
formal protocol
14. In object-oriented programming the object that is sent a message.
receiver
+
subclass
weak
15. 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.
Edit>Refactor>Convert to Objective-C ARC
Pointers
reference counting
category
16. Pointers are declared by placing a(n) ___ between the type declaration and the variable name
heap
polymorphism
nil
asterisk (*)
17. The time when source code is compiled; constrained by the amount and kind of information encoded in source files.
ampersand (&)
method
compile time
Product>Profile>Leaks>Profile
18. A class that's one step above another class in the inheritance hierarchy; the class through which a subclass inherits methods and instance variables.
binary
superclass
long long
reference counting
19. Short for mutual exclusion semaphore. An object used to synchronize thread execution.
mutex
Encapsulation
Unitary
nil
20. 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.
pointers
asterisk (*)
encapsulation
formal protocol
21. The time after a program is launched and while it's running. Decisions made at during this time can be influenced by choices the user makes.
namespace
runtime
square brackets
Product>Profile>Leaks>Profile
22. ARC is susceptible to retain _____
cycles
chars
static typing
message expression
23. A method that can operate on class objects rather than instances of the class.
class method
init
fields
synchronous message
24. Any class that's one step below another class in the inheritance hierarchy.
subclass
comma-separated
distributed objects
ARC
25. 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.
structures
outlet
nil
cannot
26. The most flexible C data type: ______
selector
struct
Edit>Refactor>Convert to Objective-C ARC
factory
27. In Objective-C floats are more commonly used than ______
@interface
Smalltalk
doubles
attributes
28. A message sent from one application to an object in another application.
inheritance hierarchy
remote message
static typing
null
29. Objective-C borrows much of its syntax from ______ one of the earliest object-oriented languages
Binary
Smalltalk
designated initializer
runtime
30. Same as class object. (first way to say it.)
protocol
cycles
ampersand (&)
factory
31. If you are compiling an application with ARC (Automatic reference Counting) you _______ store Objective-C objects inside a struct
cannot
+
superclass
conform
32. A compiler feature that provides automated memory management
cycles
ARC
binary
AppKit
33. The root class in Objective-C
factory
Categories
NSObject
attributes
34. Procedures (like verbs) are processes that manipulate or transform data and in Objective-C these 3 elements are _____ - functions and methods
double
pointers
C operators
structures
35. A _______ method is one that is likely to be unsupported in the future. It's use should be discontinued.
deprecated
Pointers
nil
assignment
36. The time when files compiled from different source modules are linked into a single program. Decisions made by the linker are constrained by the compiled code and ultimately by the information contained in source code.
assignment
interface
link time
outlet
37. C-style strings always end with a ____ character
developer intent
Smalltalk
null
framework
38. Property attribute that synthesizes only a getter for the property
procedures
remote object
struct
readonly
39. _____ allow you to add new methods to existing classes
Categories
dynamic allocation
pointer
Smalltalk
40. All objects are created on the _____
heap
instance method
Binary
struct
41. Another name for a class that's defined solely so that other classes can inherit from it.
abstract superclass
superclass
receiver
weak
42. Property attribute that causes the setter to store a strong reference to the assigned value
ARC
strong
init
%
43. Placing a ____ before a normal variable name gives it's address
inheritance hierarchy
subclass
ampersand (&)
reference counting
44. Consider: [NSString alloc]. 'alloc' is an example of a(n) class method rather than a _______ method
ARC
instance
instance method
Protocols
45. 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
fields
superclass
NSString
remote object
46. a+b; is an example of using a _____ operator
dispatch table
binary
outlet
value
47. Same as class object. (second way to say it.)
9
inheritance hierarchy
nil
factory object
48. In object-oriented programming a procedure that can be executed by an object.
method
nonatomic
interface
Protocols
49. A class is said to do this when it declares that it implements all the methods in the protocol.
%
binary
subclass
adopt
50. a++; is an example of using a _____ operator
doubles
unitary
chars
fields