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. To destroy an object set the variable that points to it to _____
square brackets
link time
nil
Cocoa
2. The 6 main categories of operators are: ____ - arithmetic - comparison - logical - bitwise and membership
+
floating-point
assignment
superclass
3. Symbol used to denote a placeholder in a format string
%
ampersand (&)
nonatomic
synchronous message
4. _____ allow you to add new methods to existing classes
Categories
attributes
anonymous object
static typing
5. In object-oriented programming the object that is sent a message.
remote message
procedural programming language
receiver
superset
6. The most flexible C data type: ______
struct
fields
class object
message
7. An object of unknown class. Interface is published through protocol declaration.
encapsulation
factory
anonymous object
asynchronous message
8. A _______ method is one that is likely to be unsupported in the future. It's use should be discontinued.
dispatch table
deprecated
selector
asynchronous message
9. 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.
designated
id
instance method
-
10. Initializer method traditionally begin with the _____ prefix
init
class
method
Protocols
11. This symbol denotes a method as being a class method
%@
-
+
[receiver message];
12. In object-oriented programming a procedure that can be executed by an object.
method
null
C operators
superclass
13. Objective-C borrows much of its syntax from ______ one of the earliest object-oriented languages
dynamic binding
delegates
class
Smalltalk
14. 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.
namespace
@interface
nil
memory leak
15. Objective-C methods are called using ____ _____
link time
square brackets
procedures
heap
16. A class is said to do this when it declares that it implements all the methods in the protocol.
Interface Builder
precedence
memory leak
adopt
17. The Objective-C runtime table that contains entries that associate method selectors with the class-specific addresses of the methods they identify.
dispatch table
instance method
receiver
unitary
18. Each class should have a ______ initializer a single method responsible for performing all of the object's setup and initialization.
instance method
designated
%@
nil
19. ARC is susceptible to retain _____
anonymous object
instance
cycles
double
20. 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.
outlet
designated initializer
superset
null
21. A class that's one step above another class in the inheritance hierarchy; the class through which a subclass inherits methods and instance variables.
message
superclass
namespace
selector
22. If you are compiling an application with ARC (Automatic reference Counting) you _______ store Objective-C objects inside a struct
Product>Profile>Leaks>Profile
cannot
zero
NSObject
23. Property attribute that causes the setter to store a copy of the assigned value
pointers
copy
anonymous object
binary
24. When creating a class header file you begin with the _____ keyword and close with the @end keyword
adopt
@interface
-
delegates
25. A prototype for a particular kind of object; declares instance variables and defines methods for all members of the class.
reference counting
Cocoa
heap
class
26. 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.
selector
binary
unitary
designated initializer
27. In C all functions pass their arguments by ____ which means the compiler makes local copies of those arguments
value
developer intent
Unitary
synchronous message
28. A struct may contain multiple ____ consisting of different data types
fields
reference counting
framework
instance
29. In a home building analogy a ____ is the blueprint and the object is the house
polymorphism
class
receiver
double
30. There are ____ fundamental building blocks in Objective-C
9
Product>Profile>Leaks>Profile
Unsigned
method
31. A compiler feature that provides automated memory management
runtime
ARC
strong
comma-separated
32. 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
runtime
class object
structures
assignment
33. Property attribute that synthesizes only a getter for the property
struct
adopt
readonly
inheritance hierarchy
34. Property attribute that causes the setter to store a zeroing weak reference to the assigned value
weak
floating-point
copy
distributed objects
35. Consider: [NSString alloc]. 'alloc' is an example of a(n) class method rather than a _______ method
instance
strong
abstract superclass
chars
36. 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
dynamic allocation
[receiver message];
NSString
interface
37. Giving the compiler information about what kind of object an instance is - by typing it as a pointer to a class.
static typing
designated initializer
weak
protocol
38. 3 Common Float data types: float - _____ - CGFloat
outlet
synchronous message
double
Categories
39. Objective-C's protocols are really about communicating _____ _______
developer intent
unitary
long long
memory leak
40. The time when source code is compiled; constrained by the amount and kind of information encoded in source files.
delegates
reference counting
category
compile time
41. An object in another application - one that's a potential receiver for a remote message.
NSObject
remote object
formal protocol
superset
42. 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.
fields
object
dynamic allocation
class object
43. A message sent from one application to an object in another application.
remote message
factory
Categories
pointers
44. 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
null
superset
designated initializer
designated
45. Property attribute that synthesizes both a getter and setter for the property
attributes
static typing
reference counting
readwrite
46. Protocols are adopted by adding a ____________ list of protocols inside angled brackets after the superclass declaration in a class's @interface block
memory leak
Enumerations
9
comma-separated
47. Same as class object. (first way to say it.)
readonly
chars
factory
dangling pointer
48. Objective-C objects should use strong or weak ______
attributes
selector
fields
runtime
49. The first index in an array is valued at ____
zero
subclass
copy
class object
50. 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.
Categories
inheritance hierarchy
@implementation
comma-separated