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 prototype for a particular kind of object; declares instance variables and defines methods for all members of the class.
message
class
fields
dynamic allocation
2. There are ____ fundamental building blocks in Objective-C
distributed objects
assign
9
runtime
3. Any class that's one step below another class in the inheritance hierarchy.
ARC
subclass
zero
readwrite
4. This symbol denotes a method as being an instance method
-
%
class
implementation
5. 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.
Protocols
fields
instance variable
Signed
6. The first index in an array is valued at ____
designated
Categories
zero
[receiver message];
7. _____ allow you to add new methods to existing classes
procedural programming language
Categories
adopt
null
8. Zeroing weak referencing should be used for _____ and data sources to prevent inadvertent retain cycles
structures
delegates
binary
method
9. 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.
class object
doubles
instance
memory leak
10. When creating a class header file you begin with the _____ keyword and close with the @end keyword
@interface
square brackets
init
Smalltalk
11. In a format string the place holder for an object is ______
dynamic typing
%@
reference counting
AppKit
12. 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
synchronous message
remote message
readwrite
weak
13. An object of unknown class. Interface is published through protocol declaration.
cycles
distributed objects
anonymous object
@interface
14. Each class should have a ______ initializer a single method responsible for performing all of the object's setup and initialization.
Protocols
precedence
abstract class
designated
15. A memory-management technique in which each entity that claims ownership of an object increments the object's reference count and later decrements it; allows one instance of an object to be safely shared among several other objects.
printf( )
factory object
outlet
reference counting
16. In object-oriented programming the ability of different objects to respond each in its own way - to the same message.
cycles
polymorphism
struct
factory object
17. In C all functions pass their arguments by ____ which means the compiler makes local copies of those arguments
heap
value
long long
printf( )
18. Placing a ____ before a normal variable name gives it's address
Binary
ampersand (&)
assign
Product>Profile>Leaks>Profile
19. Protocols are adopted by adding a ____________ list of protocols inside angled brackets after the superclass declaration in a class's @interface block
pointers
comma-separated
NSString
Product>Profile>Leaks>Profile
20. 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
@implementation
NSString
Unsigned
dynamic binding
21. The most flexible C data type: ______
adopt
factory
struct
Categories
22. 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
struct
instance
doubles
23. To destroy an object set the variable that points to it to _____
instance
%@
nil
instance variable
24. a+b; is an example of using a _____ operator
binary
outlet
conform
class
25. A class is said to do this when it declares that it implements all the methods in the protocol.
NSString
long long
adopt
Enumerations
26. 3 Common Float data types: float - _____ - CGFloat
double
binary
assign
reference counting
27. 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
abstract superclass
object
Encapsulation
28. A class that's one step above another class in the inheritance hierarchy; the class through which a subclass inherits methods and instance variables.
[receiver message];
nil
conform
superclass
29. The process of setting or reading the value at an address pointed to by a pointer
square brackets
link time
Cocoa
dereference (dereferencing)
30. Consider: [NSString alloc]. 'alloc' is an example of a(n) class method rather than a _______ method
static typing
value
instance
heap
31. ______ operators take a single operand
long long
Unitary
Signed
doubles
32. The _____ function can be used to print a message to the console
+
init
printf( )
asynchronous message
33. 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.
binary
null
id
cycles
34. Property attribute that synthesizes only a getter for the property
long long
inheritance
class object
readonly
35. Objective-C's protocols are really about communicating _____ _______
floating-point
Protocols
weak
developer intent
36. Procedures (like verbs) are processes that manipulate or transform data and in Objective-C these 3 elements are _____ - functions and methods
category
struct
method
C operators
37. Initializer method traditionally begin with the _____ prefix
delegates
init
protocol
method
38. An object in another application - one that's a potential receiver for a remote message.
reference counting
unitary
remote object
formal protocol
39. Same as class object. (second way to say it.)
encapsulation
comma-separated
protocol
factory object
40. Xcode sequence to convert non-ARC apps to ARC
abstract class
dynamic binding
assign
Edit>Refactor>Convert to Objective-C ARC
41. A message sent from one application to an object in another application.
+
remote message
pointer
attributes
42. A protocol declared as a category usually as a category of the NSObject class.
outlet
copy
class
informal protocol
43. Pointers are declared by placing a(n) ___ between the type declaration and the variable name
dangling pointer
static typing
asterisk (*)
Pointers
44. The time when source code is compiled; constrained by the amount and kind of information encoded in source files.
AppKit
procedural programming language
compile time
Enumerations
45. Property attribute that causes the setter to store a zeroing weak reference to the assigned value
framework
nil
weak
dynamic binding
46. In Objective-C floats are more commonly used than ______
Edit>Refactor>Convert to Objective-C ARC
doubles
%@
comma-separated
47. Three main categories of more complicated data structures:_______ - arrays and structs
instance
NSString
pointers
assignment
48. 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.
readonly
encapsulation
outlet
instance
49. A ____ _____ is where you forget to free up memory
square brackets
memory leak
structures
copy
50. The nine fundamental building blocks of Objective-C can be dividing into 2 categories: data and _______
procedures
category
instance method
Unsigned