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. A variable that points to the memory address of another value
nil
pointer
copy
9
2. To destroy an object set the variable that points to it to _____
implementation
Enumerations
double
nil
3. Finding the method implementation to invoke in response to the message
dynamic binding
Categories
event
readwrite
4. 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
+
floating-point
receiver
conform
5. 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
init
assign
class object
6. 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.
encapsulation
Cocoa
memory leak
instance
7. Any method that can be used by an instance of a class rather than by the class object.
instance method
Signed
properties
Protocols
8. A class that's one step above another class in the inheritance hierarchy; the class through which a subclass inherits methods and instance variables.
dynamic typing
formal protocol
class object
superclass
9. Objective-C objects should use strong or weak ______
synchronous message
dynamic allocation
Product>Profile>Leaks>Profile
attributes
10. All objects are created on the _____
heap
printf( )
object
receiver
11. Each class should have a ______ initializer a single method responsible for performing all of the object's setup and initialization.
framework
designated
static typing
Unitary
12. 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.
-
Encapsulation
class
dynamic allocation
13. A message sent from one application to an object in another application.
Smalltalk
remote message
Protocols
@interface
14. 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).
remote object
implementation
Protocols
pointers
15. In C all functions pass their arguments by ____ which means the compiler makes local copies of those arguments
synchronous message
conform
value
Encapsulation
16. In a format string the place holder for an object is ______
abstract superclass
%@
%
subclass
17. Pointers are declared by placing a(n) ___ between the type declaration and the variable name
asterisk (*)
Smalltalk
Unitary
inheritance hierarchy
18. Three main categories of more complicated data structures:_______ - arrays and structs
Edit>Refactor>Convert to Objective-C ARC
properties
comma-separated
pointers
19. A _______ method is one that is likely to be unsupported in the future. It's use should be discontinued.
deprecated
nil
struct
outlet
20. An object that acts on behalf of another object.
delegate
interface
Categories
-
21. This symbol denotes a method as being an instance method
runtime
assign
-
zero
22. In object-oriented programming the ability of different objects to respond each in its own way - to the same message.
adopt
deprecated
polymorphism
Protocols
23. 3 Common Float data types: float - _____ - CGFloat
doubles
double
subclass
deprecated
24. A struct may contain multiple ____ consisting of different data types
dynamic binding
fields
init
adopt
25. Procedures (like verbs) are processes that manipulate or transform data and in Objective-C these 3 elements are _____ - functions and methods
ARC
C operators
Unsigned
value
26. Another name for a class that's defined solely so that other classes can inherit from it.
Categories
NSObject
superclass
abstract superclass
27. 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.
protocol
designated initializer
class object
attributes
28. Property attribute that synthesizes only a getter for the property
class
readonly
NSObject
null
29. 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
structures
readwrite
asterisk (*)
floating-point
30. A class is said to do this when it declares that it implements all the methods in the protocol.
unitary
NSString
interface
adopt
31. In Objective-C floats are more commonly used than ______
asterisk (*)
doubles
adopt
dangling pointer
32. Objective-C methods are called using ____ _____
square brackets
[receiver message];
nonatomic
framework
33. Same as class object. (second way to say it.)
selector
encapsulation
factory object
heap
34. Two additional foundational building blocks of Objective-C distinct from data and procedure type foundations: ________ and Categories/Extensions
copy
Protocols
%
nil
35. Zeroing weak referencing should be used for _____ and data sources to prevent inadvertent retain cycles
class
procedural programming language
delegates
nil
36. Protocols are adopted by adding a ____________ list of protocols inside angled brackets after the superclass declaration in a class's @interface block
struct
Encapsulation
namespace
comma-separated
37. In object-oriented programming - the method selector (name) and accompanying parameters that tell the receiving object in a message expression what to do.
assignment
message
Categories
dispatch table
38. A ____ _____ is where you forget to free up memory
designated initializer
memory leak
selector
+
39. Xcode sequence to examine an app for memory leaks or retain cycles
Product>Profile>Leaks>Profile
Unsigned
Interface Builder
dynamic allocation
40. 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
event
9
subclass
41. The root class in Objective-C
factory
distributed objects
ampersand (&)
NSObject
42. C-style strings are stored in an array of _____
pointers
developer intent
-
chars
43. Objective-C is a _____ of the C language
C operators
pointer
interface
superset
44. Property attribute that synthesizes accessors that are not thread safe
abstract superclass
procedural programming language
nonatomic
memory leak
45. Placing a ____ before a normal variable name gives it's address
anonymous object
copy
ampersand (&)
binary
46. Initializer method traditionally begin with the _____ prefix
weak
%
init
outlet
47. 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
square brackets
deprecated
event
48. C-style strings always end with a ____ character
null
event
Product>Profile>Leaks>Profile
weak
49. In a home building analogy a ____ is the blueprint and the object is the house
pointers
anonymous object
class
framework
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.
asynchronous message
@interface
inheritance hierarchy
abstract class