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. Consider: [NSString alloc]. 'alloc' is an example of a(n) class method rather than a _______ method
Categories
instance
instance
runtime
2. A class is said to do this when it declares that it implements all the methods in the protocol.
pointers
readonly
adopt
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.
superclass
conform
designated
Smalltalk
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.
factory
structures
formal protocol
+
5. Square bracket syntax for calling a method
designated
[receiver message];
interface
link time
6. To destroy an object set the variable that points to it to _____
nil
factory
method
memory leak
7. A ____ ____ is a situation where you free memory and then accidentally continue to use it
cycles
dangling pointer
dynamic allocation
category
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.
%@
subclass
id
deprecated
9. In object-oriented programming the object that is sent a message.
receiver
formal protocol
remote object
class
10. When creating a class implementation file you begin with the _____ keyword and close with the @end keyword
formal protocol
AppKit
@implementation
class object
11. The process of setting or reading the value at an address pointed to by a pointer
init
NSObject
delegates
dereference (dereferencing)
12. In object-oriented programming the ability of different objects to respond each in its own way - to the same message.
mutex
polymorphism
nil
instance
13. Three main categories of more complicated data structures:_______ - arrays and structs
chars
pointers
factory
asterisk (*)
14. Property attribute where the setter stores the assigned value but does not perform any memory management.
assign
superset
class object
developer intent
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.
inheritance hierarchy
protocol
outlet
%@
16. In a home building analogy a ____ is the blueprint and the object is the house
class
abstract class
Signed
receiver
17. A protocol declared as a category usually as a category of the NSObject class.
remote object
Unitary
outlet
informal protocol
18. Objective-C borrows much of its syntax from ______ one of the earliest object-oriented languages
procedural programming language
cannot
memory leak
Smalltalk
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.
selector
init
interface
Product>Profile>Leaks>Profile
20. Property attribute that causes the setter to store a strong reference to the assigned value
outlet
strong
pointers
Interface Builder
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.
doubles
nonatomic
formal protocol
object
22. Objective-C objects should use strong or weak ______
dynamic typing
zero
attributes
dispatch table
23. A language such as C that organizes a program as a set of procedures that have definite beginnings and ends.
procedural programming language
dynamic typing
weak
Smalltalk
24. Xcode sequence to examine an app for memory leaks or retain cycles
NSString
Product>Profile>Leaks>Profile
remote object
Unitary
25. _____ allow you to add new methods to existing classes
init
-
Protocols
Categories
26. Giving the compiler information about what kind of object an instance is - by typing it as a pointer to a class.
method
superclass
static typing
message
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.
pointer
floating-point
abstract class
cannot
28. 3 Common Float data types: float - _____ - CGFloat
double
remote object
message
method
29. The 6 main categories of operators are: ____ - arithmetic - comparison - logical - bitwise and membership
instance variable
nil
message expression
assignment
30. The _____ function can be used to print a message to the console
delegates
Enumerations
Unsigned
printf( )
31. Each class should have a ______ initializer a single method responsible for performing all of the object's setup and initialization.
designated
dynamic allocation
%@
null
32. In a format string the place holder for an object is ______
Protocols
%@
message expression
namespace
33. A message sent from one application to an object in another application.
memory leak
binary
remote message
designated
34. All objects are created on the _____
Smalltalk
superclass
heap
namespace
35. Objective-C is a _____ of the C language
%
assignment
compile time
superset
36. A set of method definitions that is segregated from the rest of the class definition.
nonatomic
category
square brackets
mutex
37. An object that acts on behalf of another object.
class method
event
ampersand (&)
delegate
38. A prototype for a particular kind of object; declares instance variables and defines methods for all members of the class.
superset
square brackets
class
value
39. If you are compiling an application with ARC (Automatic reference Counting) you _______ store Objective-C objects inside a struct
[receiver message];
cannot
Product>Profile>Leaks>Profile
runtime
40. Initializer method traditionally begin with the _____ prefix
C operators
synchronous message
init
developer intent
41. Property attribute that synthesizes accessors that are not thread safe
nonatomic
selector
procedures
Binary
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
class
struct
factory
designated initializer
43. a+b; is an example of using a _____ operator
copy
implementation
binary
Unitary
44. In object-oriented programming - the method selector (name) and accompanying parameters that tell the receiving object in a message expression what to do.
conform
message
nonatomic
id
45. There are ____ fundamental building blocks in Objective-C
instance variable
abstract class
9
polymorphism
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).
message expression
AppKit
subclass
value
47. ____ provide a concise & elegant method for defining a discrete set of values
reference counting
comma-separated
Enumerations
message
48. _____ operators take 2 operands
Binary
strong
outlet
init
49. Placing a ____ before a normal variable name gives it's address
Protocols
fields
comma-separated
ampersand (&)
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.
reference counting
encapsulation
9
link time