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. Any method that can be used by an instance of a class rather than by the class object.
memory leak
NSString
instance method
fields
2. 7 Common Integer data types: BOOL - char- short - int - long - _____ - NSInteger
factory object
precedence
[receiver message];
long long
3. Initializer method traditionally begin with the _____ prefix
init
NSString
Protocols
square brackets
4. This symbol denotes a method as being a class method
selector
superclass
null
+
5. A _______ method is one that is likely to be unsupported in the future. It's use should be discontinued.
Cocoa
implementation
deprecated
class object
6. This symbol denotes a method as being an instance method
dereference (dereferencing)
-
adopt
reference counting
7. Another name for a class that's defined solely so that other classes can inherit from it.
struct
heap
abstract superclass
event
8. Consider: [NSString alloc]. 'alloc' is an example of a(n) class method rather than a _______ method
instance
object
static typing
developer intent
9. In object-oriented programming - the method selector (name) and accompanying parameters that tell the receiving object in a message expression what to do.
Smalltalk
heap
long long
message
10. In Objective-C floats are more commonly used than ______
value
[receiver message];
informal protocol
doubles
11. Property attribute that causes the setter to store a strong reference to the assigned value
developer intent
copy
strong
outlet
12. A struct may contain multiple ____ consisting of different data types
nil
fields
value
pointers
13. A class is said to do this to a protocol if it (or a superclass) implements the methods declared in the protocol. An instance does this to a protocol if its class does. Thus an instance that does this to a protocol can perform any of the instance met
framework
conform
class method
abstract class
14. 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
copy
designated initializer
AppKit
developer intent
15. 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.
-
floating-point
link time
Unsigned
16. Protocols are adopted by adding a ____________ list of protocols inside angled brackets after the superclass declaration in a class's @interface block
null
comma-separated
distributed objects
mutex
17. Objective-C binds methods and arguments at _____ instead of compile time
ampersand (&)
runtime
compile time
instance
18. _____ operators take 2 operands
NSObject
Binary
category
dynamic binding
19. In object-oriented programming the hierarchy of classes that's defined by the arrangement of superclasses and subclasses. Every class (except root classes such as NSObject) has a superclass and any class may have an unlimited number of subclasses.
inheritance hierarchy
nil
superclass
square brackets
20. _____ allow indirect access and modification of a variable's value.
Pointers
value
link time
subclass
21. An advanced object-oriented development platform in Mac OS X; a set of frameworks whose primary programming interfaces are in Objective-C.
9
Cocoa
reference counting
class
22. Discovering the class of an object at runtime rather than at compile time.
dynamic typing
strong
remote object
Encapsulation
23. Objective-C's protocols are really about communicating _____ _______
method
developer intent
delegate
formal protocol
24. A set of method definitions that is segregated from the rest of the class definition.
dispatch table
category
9
namespace
25. Two additional foundational building blocks of Objective-C distinct from data and procedure type foundations: ________ and Categories/Extensions
Protocols
memory leak
floating-point
nonatomic
26. 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.
mutex
readonly
long long
encapsulation
27. a++; is an example of using a _____ operator
nil
id
Protocols
unitary
28. A message sent from one application to an object in another application.
remote message
attributes
readwrite
square brackets
29. An architecture that facilitates communication between objects in different address spaces.
assignment
formal protocol
interface
distributed objects
30. The first index in an array is valued at ____
synchronous message
zero
-
null
31. _____ 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'.
Encapsulation
Signed
nil
Unsigned
32. A compiler feature that provides automated memory management
runtime
ARC
synchronous message
procedures
33. Property attribute that causes the setter to store a zeroing weak reference to the assigned value
weak
selector
delegates
9
34. 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).
Edit>Refactor>Convert to Objective-C ARC
implementation
unitary
id
35. 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.
instance variable
event
heap
comma-separated
36. To destroy an object set the variable that points to it to _____
deprecated
interface
-
nil
37. 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.
floating-point
Smalltalk
readwrite
object
38. In C all functions pass their arguments by ____ which means the compiler makes local copies of those arguments
instance
conform
double
value
39. The root class in Objective-C
deprecated
null
Smalltalk
NSObject
40. When creating a class implementation file you begin with the _____ keyword and close with the @end keyword
@implementation
static typing
C operators
init
41. Xcode sequence to convert non-ARC apps to ARC
Edit>Refactor>Convert to Objective-C ARC
dispatch table
message
doubles
42. Placing a ____ before a normal variable name gives it's address
zero
ampersand (&)
structures
message
43. In object-oriented programming a procedure that can be executed by an object.
interface
method
synchronous message
adopt
44. Data types are divided into two main categories: integer and ______
inheritance hierarchy
nil
floating-point
readwrite
45. Any class that's one step below another class in the inheritance hierarchy.
[receiver message];
Pointers
subclass
class method
46. A ____ ____ is a situation where you free memory and then accidentally continue to use it
Categories
dangling pointer
ARC
9
47. C-style strings always end with a ____ character
abstract class
null
nil
receiver
48. Objective-C objects should use strong or weak ______
dynamic allocation
readwrite
%@
attributes
49. Giving the compiler information about what kind of object an instance is - by typing it as a pointer to a class.
static typing
dynamic allocation
message expression
Edit>Refactor>Convert to Objective-C ARC
50. A variable that points to the memory address of another value
dispatch table
class
pointer
factory