SUBJECTS
|
BROWSE
|
CAREER CENTER
|
POPULAR
|
JOIN
|
LOGIN
Business Skills
|
Soft Skills
|
Basic Literacy
|
Certifications
About
|
Help
|
Privacy
|
Terms
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. 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
designated initializer
selector
namespace
structures
2. 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.
floating-point
outlet
heap
inheritance hierarchy
3. 7 Common Integer data types: BOOL - char- short - int - long - _____ - NSInteger
runtime
long long
square brackets
+
4. 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).
static typing
method
distributed objects
message expression
5. _____ allow you to add new methods to existing classes
runtime
Enumerations
class object
Categories
6. Xcode sequence to convert non-ARC apps to ARC
message expression
Edit>Refactor>Convert to Objective-C ARC
%@
Protocols
7. The root class in Objective-C
NSObject
double
abstract class
attributes
8. Giving the compiler information about what kind of object an instance is - by typing it as a pointer to a class.
message
static typing
attributes
value
9. Objective-C's protocols are really about communicating _____ _______
Smalltalk
procedures
delegates
developer intent
10. A tool that lets you graphically specify your application's user interface. It sets up the corresponding objects for you and makes it easy for you to establish connections between these objects and your own code where needed.
category
instance
Interface Builder
nil
11. A remote message that returns immediately without waiting for the application that receives the message to respond. The sending application and the receiving application act independently and are therefore not in sync.
message expression
class object
asynchronous message
selector
12. When creating a class implementation file you begin with the _____ keyword and close with the @end keyword
method
@implementation
Binary
adopt
13. C-style strings are stored in an array of _____
chars
structures
Encapsulation
namespace
14. Objective-C borrows much of its syntax from ______ one of the earliest object-oriented languages
delegate
asynchronous message
Smalltalk
zero
15. A class is said to do this when it declares that it implements all the methods in the protocol.
delegates
Unitary
adopt
message expression
16. 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.
dynamic allocation
instance method
designated
properties
17. a++; is an example of using a _____ operator
-
memory leak
unitary
readonly
18. 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
synchronous message
long long
runtime
19. Pointers are declared by placing a(n) ___ between the type declaration and the variable name
asterisk (*)
runtime
deprecated
category
20. 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.
Cocoa
class object
informal protocol
null
21. Finding the method implementation to invoke in response to the message
Cocoa
superset
runtime
dynamic binding
22. In computer science the mathematical concept of 'order of operations' is known as the 'order of ______'
precedence
9
square brackets
object
23. An object that acts on behalf of another object.
attributes
delegate
assign
C operators
24. The most flexible C data type: ______
fields
struct
nonatomic
synchronous message
25. A ____ _____ is where you forget to free up memory
developer intent
message
framework
memory leak
26. All objects are created on the _____
id
heap
instance
readwrite
27. 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
@interface
runtime
synchronous message
receiver
28. Square bracket syntax for calling a method
[receiver message];
dereference (dereferencing)
structures
distributed objects
29. 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
formal protocol
mutex
+
conform
30. A _______ method is one that is likely to be unsupported in the future. It's use should be discontinued.
%
deprecated
binary
Encapsulation
31. Procedures (like verbs) are processes that manipulate or transform data and in Objective-C these 3 elements are _____ - functions and methods
doubles
C operators
precedence
cannot
32. A struct may contain multiple ____ consisting of different data types
class method
fields
%
Enumerations
33. Zeroing weak referencing should be used for _____ and data sources to prevent inadvertent retain cycles
Pointers
Cocoa
instance method
delegates
34. _____ allow indirect access and modification of a variable's value.
memory leak
%@
AppKit
Pointers
35. Any class that's one step below another class in the inheritance hierarchy.
Enumerations
subclass
Categories
asterisk (*)
36. The first index in an array is valued at ____
instance
superset
procedures
zero
37. Another name for a class that's defined solely so that other classes can inherit from it.
instance method
informal protocol
abstract superclass
C operators
38. The time when source code is compiled; constrained by the amount and kind of information encoded in source files.
compile time
dereference (dereferencing)
abstract class
dynamic binding
39. Two additional foundational building blocks of Objective-C distinct from data and procedure type foundations: ________ and Categories/Extensions
Binary
Edit>Refactor>Convert to Objective-C ARC
Product>Profile>Leaks>Profile
Protocols
40. Discovering the class of an object at runtime rather than at compile time.
designated initializer
dynamic typing
dangling pointer
NSString
41. Symbol used to denote a placeholder in a format string
cycles
runtime
%
remote object
42. A set of method definitions that is segregated from the rest of the class definition.
formal protocol
category
properties
Unitary
43. Initializer method traditionally begin with the _____ prefix
[receiver message];
struct
ARC
init
44. A prototype for a particular kind of object; declares instance variables and defines methods for all members of the class.
dispatch table
Encapsulation
init
class
45. 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.
link time
Protocols
structures
C operators
46. _____ 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
anonymous object
receiver
readonly
47. The part of an Objective-C class specification that declares its public interface which includes its superclass name & instances variables and public-method prototypes.
runtime
@interface
pointer
interface
48. A protocol declared as a category usually as a category of the NSObject class.
structures
Protocols
zero
informal protocol
49. ARC is susceptible to retain _____
Product>Profile>Leaks>Profile
designated initializer
long long
cycles
50. In the Objective-C language an object that belongs to (is a member of) a particular class; created at runtime according to the specification in the class definition.
properties
instance
Unitary
asterisk (*)