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. Short for mutual exclusion semaphore. An object used to synchronize thread execution.
Cocoa
ampersand (&)
mutex
memory leak
2. C-style strings always end with a ____ character
dispatch table
runtime
strong
null
3. 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.
Binary
synchronous message
nonatomic
dynamic allocation
4. Procedures (like verbs) are processes that manipulate or transform data and in Objective-C these 3 elements are _____ - functions and methods
C operators
cannot
readonly
anonymous object
5. Xcode sequence to examine an app for memory leaks or retain cycles
Binary
cannot
instance
Product>Profile>Leaks>Profile
6. 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.
precedence
inheritance hierarchy
@interface
reference counting
7. A compiler feature that provides automated memory management
ARC
conform
asynchronous message
%
8. _____ allow you to add new methods to existing classes
9
instance method
dereference (dereferencing)
Categories
9. Square bracket syntax for calling a method
receiver
[receiver message];
link time
nil
10. 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
cannot
compile time
abstract class
NSString
11. When creating a class implementation file you begin with the _____ keyword and close with the @end keyword
@implementation
attributes
protocol
square brackets
12. An object id with a value of 0.
struct
nil
weak
interface
13. The _____ function can be used to print a message to the console
conform
printf( )
NSString
nonatomic
14. 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.
category
factory
selector
square brackets
15. Pointers are declared by placing a(n) ___ between the type declaration and the variable name
procedural programming language
Enumerations
dynamic typing
asterisk (*)
16. The process of setting or reading the value at an address pointed to by a pointer
dereference (dereferencing)
%
nil
unitary
17. Any class that's one step below another class in the inheritance hierarchy.
subclass
mutex
informal protocol
method
18. Three main categories of more complicated data structures:_______ - arrays and structs
delegate
pointers
designated
runtime
19. An object that acts on behalf of another object.
delegate
chars
strong
assignment
20. Discovering the class of an object at runtime rather than at compile time.
object
dynamic typing
chars
abstract superclass
21. Consider: [NSString alloc]. 'alloc' is an example of a(n) class method rather than a _______ method
abstract superclass
designated
AppKit
instance
22. In object-oriented programming the object that is sent a message.
comma-separated
receiver
polymorphism
square brackets
23. _____ 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'.
-
square brackets
Encapsulation
dereference (dereferencing)
24. Property attribute that causes the setter to store a strong reference to the assigned value
procedural programming language
readonly
strong
%@
25. 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).
Smalltalk
delegate
Binary
implementation
26. Property attribute where the setter stores the assigned value but does not perform any memory management.
copy
unitary
NSString
assign
27. Symbol used to denote a placeholder in a format string
null
chars
%
category
28. 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.
Unsigned
namespace
distributed objects
weak
29. All objects are created on the _____
properties
inheritance hierarchy
heap
designated initializer
30. A _______ method is one that is likely to be unsupported in the future. It's use should be discontinued.
Unsigned
deprecated
square brackets
+
31. A language such as C that organizes a program as a set of procedures that have definite beginnings and ends.
chars
asterisk (*)
Product>Profile>Leaks>Profile
procedural programming language
32. 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
instance variable
class
cannot
33. C-style strings are stored in an array of _____
chars
instance method
structures
@implementation
34. ______ operators take a single operand
asterisk (*)
class
Unitary
Encapsulation
35. In object-oriented programming a procedure that can be executed by an object.
zero
compile time
method
strong
36. a++; is an example of using a _____ operator
unitary
remote message
@interface
nonatomic
37. 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
readwrite
runtime
inheritance
structures
38. Placing a ____ before a normal variable name gives it's address
Cocoa
ampersand (&)
factory
instance
39. Any method that can be used by an instance of a class rather than by the class object.
message
category
event
instance method
40. The Objective-C runtime table that contains entries that associate method selectors with the class-specific addresses of the methods they identify.
null
dispatch table
class
dangling pointer
41. In Objective-C floats are more commonly used than ______
doubles
floating-point
dereference (dereferencing)
dynamic allocation
42. Initializer method traditionally begin with the _____ prefix
init
conform
designated
Product>Profile>Leaks>Profile
43. 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.
id
message expression
floating-point
developer intent
44. Protocols are adopted by adding a ____________ list of protocols inside angled brackets after the superclass declaration in a class's @interface block
factory object
+
9
comma-separated
45. The part of an Objective-C class specification that declares its public interface which includes its superclass name & instances variables and public-method prototypes.
Protocols
Interface Builder
printf( )
interface
46. To destroy an object set the variable that points to it to _____
nil
static typing
anonymous object
copy
47. 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.
anonymous object
interface
%@
formal protocol
48. 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.
deprecated
designated initializer
abstract class
instance
49. 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.
implementation
encapsulation
designated
AppKit
50. Property attribute that synthesizes both a getter and setter for the property
-
asynchronous message
id
readwrite