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. When creating a class header file you begin with the _____ keyword and close with the @end keyword
implementation
@interface
deprecated
class object
2. In a format string the place holder for an object is ______
%@
Product>Profile>Leaks>Profile
cannot
NSObject
3. A protocol declared as a category usually as a category of the NSObject class.
dereference (dereferencing)
@interface
informal protocol
receiver
4. Any class that's one step below another class in the inheritance hierarchy.
procedural programming language
subclass
Enumerations
adopt
5. Objective-C objects should use strong or weak ______
attributes
cycles
Enumerations
class
6. The direct or indirect report of external activity especially user activity on the keyboard and mouse.
object
C operators
event
distributed objects
7. 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.
nil
subclass
formal protocol
weak
8. The Objective-C runtime table that contains entries that associate method selectors with the class-specific addresses of the methods they identify.
NSObject
printf( )
dispatch table
id
9. The first index in an array is valued at ____
zero
static typing
strong
informal protocol
10. In C all functions pass their arguments by ____ which means the compiler makes local copies of those arguments
value
Enumerations
procedural programming language
class
11. 7 Common Integer data types: BOOL - char- short - int - long - _____ - NSInteger
procedures
long long
dynamic allocation
instance
12. ______ operators take a single operand
Pointers
synchronous message
Unitary
informal protocol
13. Consider: [NSString alloc]. 'alloc' is an example of a(n) class method rather than a _______ method
id
instance
polymorphism
long long
14. Property attribute that synthesizes only a getter for the property
inheritance
readonly
assignment
square brackets
15. Three main categories of more complicated data structures:_______ - arrays and structs
C operators
formal protocol
pointers
struct
16. A Cocoa framework that implements an application's user interface; provides a basic program structure for applications that draw on the screen and respond to events.
NSObject
AppKit
chars
class
17. Data types are divided into two main categories: integer and ______
floating-point
informal protocol
cannot
class
18. The root class in Objective-C
asterisk (*)
Protocols
NSObject
double
19. 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.
heap
interface
abstract class
[receiver message];
20. A compiler feature that provides automated memory management
Product>Profile>Leaks>Profile
Interface Builder
weak
ARC
21. Zeroing weak referencing should be used for _____ and data sources to prevent inadvertent retain cycles
delegates
dynamic allocation
Cocoa
object
22. 3 Common Float data types: float - _____ - CGFloat
developer intent
deprecated
double
@interface
23. 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.
subclass
object
binary
mutex
24. Two additional foundational building blocks of Objective-C distinct from data and procedure type foundations: ________ and Categories/Extensions
developer intent
abstract superclass
Protocols
distributed objects
25. When creating a class implementation file you begin with the _____ keyword and close with the @end keyword
reference counting
informal protocol
@implementation
synchronous message
26. An object id with a value of 0.
binary
attributes
nil
informal protocol
27. Property attribute that synthesizes both a getter and setter for the property
synchronous message
class
delegate
readwrite
28. A ____ _____ is where you forget to free up memory
category
memory leak
dynamic typing
doubles
29. The time when source code is compiled; constrained by the amount and kind of information encoded in source files.
framework
instance method
link time
compile time
30. 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
heap
conform
abstract superclass
Product>Profile>Leaks>Profile
31. A ____ ____ is a situation where you free memory and then accidentally continue to use it
dangling pointer
link time
instance variable
cycles
32. Pointers are declared by placing a(n) ___ between the type declaration and the variable name
distributed objects
designated initializer
Binary
asterisk (*)
33. 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.
NSString
procedural programming language
remote object
outlet
34. A class that's one step above another class in the inheritance hierarchy; the class through which a subclass inherits methods and instance variables.
chars
instance method
delegates
superclass
35. All objects are created on the _____
ARC
attributes
heap
instance
36. 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.
value
encapsulation
Interface Builder
developer intent
37. C-style strings are stored in an array of _____
Pointers
instance variable
chars
compile time
38. Property attribute that synthesizes accessors that are not thread safe
class
Protocols
method
nonatomic
39. 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
instance
-
synchronous message
[receiver message];
40. In object-oriented programming the ability of a superclass to pass its characteristics (methods and instance variables) on to its subclasses.
9
-
inheritance
procedures
41. In object-oriented programming the object that is sent a message.
dynamic typing
instance method
receiver
mutex
42. Xcode sequence to examine an app for memory leaks or retain cycles
category
asterisk (*)
Product>Profile>Leaks>Profile
nil
43. 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.
delegate
instance
reference counting
Edit>Refactor>Convert to Objective-C ARC
44. A struct may contain multiple ____ consisting of different data types
asynchronous message
runtime
fields
Unsigned
45. _____ allow you to add new methods to existing classes
Categories
nil
dynamic binding
ampersand (&)
46. Discovering the class of an object at runtime rather than at compile time.
%
procedures
factory
dynamic typing
47. Xcode sequence to convert non-ARC apps to ARC
Edit>Refactor>Convert to Objective-C ARC
heap
struct
runtime
48. The nine fundamental building blocks of Objective-C can be dividing into 2 categories: data and _______
inheritance hierarchy
procedures
static typing
class method
49. A variable that points to the memory address of another value
Protocols
dereference (dereferencing)
pointer
synchronous message
50. 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).
+
object
link time
message expression