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. Giving the compiler information about what kind of object an instance is - by typing it as a pointer to a class.
dynamic allocation
Interface Builder
inheritance
static typing
2. This symbol denotes a method as being a class method
init
superset
Cocoa
+
3. The process of setting or reading the value at an address pointed to by a pointer
null
init
dereference (dereferencing)
[receiver message];
4. This symbol denotes a method as being an instance method
developer intent
-
object
inheritance
5. ARC is susceptible to retain _____
cycles
Product>Profile>Leaks>Profile
Smalltalk
superclass
6. Procedures (like verbs) are processes that manipulate or transform data and in Objective-C these 3 elements are _____ - functions and methods
adopt
memory leak
C operators
instance
7. The most flexible C data type: ______
anonymous object
chars
pointer
struct
8. When creating a class implementation file you begin with the _____ keyword and close with the @end keyword
ARC
@implementation
null
readwrite
9. Initializer method traditionally begin with the _____ prefix
%
distributed objects
assignment
init
10. Discovering the class of an object at runtime rather than at compile time.
method
dynamic typing
selector
Edit>Refactor>Convert to Objective-C ARC
11. Property attribute that causes the setter to store a strong reference to the assigned value
strong
Binary
weak
designated initializer
12. Same as class object. (first way to say it.)
Categories
Smalltalk
factory
category
13. Objective-C methods are called using ____ _____
class method
runtime
square brackets
assign
14. Property attribute that causes the setter to store a copy of the assigned value
designated initializer
Cocoa
copy
readwrite
15. 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.
event
object
null
superset
16. 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.
dynamic allocation
outlet
weak
Unitary
17. Finding the method implementation to invoke in response to the message
value
superclass
dynamic binding
readonly
18. An object id with a value of 0.
cycles
+
nil
formal protocol
19. If you are compiling an application with ARC (Automatic reference Counting) you _______ store Objective-C objects inside a struct
ampersand (&)
cannot
floating-point
unitary
20. 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
Signed
formal protocol
designated initializer
inheritance
21. 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.
static typing
chars
namespace
abstract class
22. Pointers are declared by placing a(n) ___ between the type declaration and the variable name
Interface Builder
asterisk (*)
long long
Pointers
23. An object that acts on behalf of another object.
subclass
delegate
object
factory object
24. 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.
Pointers
remote message
Interface Builder
dynamic allocation
25. _____ operators take 2 operands
nonatomic
Binary
dereference (dereferencing)
null
26. In a format string the place holder for an object is ______
nil
%@
polymorphism
Protocols
27. Each class should have a ______ initializer a single method responsible for performing all of the object's setup and initialization.
AppKit
designated
properties
namespace
28. Square bracket syntax for calling a method
Encapsulation
informal protocol
dereference (dereferencing)
[receiver message];
29. 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.
value
doubles
instance
synchronous message
30. 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
class method
designated initializer
subclass
31. 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.
polymorphism
asynchronous message
class method
designated
32. The Objective-C runtime table that contains entries that associate method selectors with the class-specific addresses of the methods they identify.
dispatch table
informal protocol
receiver
dangling pointer
33. A class is said to do this when it declares that it implements all the methods in the protocol.
factory
C operators
adopt
dangling pointer
34. A protocol declared as a category usually as a category of the NSObject class.
informal protocol
dynamic binding
protocol
null
35. In Objective-C floats are more commonly used than ______
doubles
zero
developer intent
factory object
36. A method that can operate on class objects rather than instances of the class.
+
compile time
class method
Encapsulation
37. 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).
encapsulation
cycles
implementation
dereference (dereferencing)
38. _____ allow indirect access and modification of a variable's value.
value
Pointers
inheritance hierarchy
informal protocol
39. In object-oriented programming the ability of different objects to respond each in its own way - to the same message.
category
dereference (dereferencing)
instance
polymorphism
40. 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.
dereference (dereferencing)
formal protocol
NSObject
printf( )
41. An advanced object-oriented development platform in Mac OS X; a set of frameworks whose primary programming interfaces are in Objective-C.
distributed objects
dispatch table
factory object
Cocoa
42. 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.
anonymous object
%
link time
square brackets
43. Xcode sequence to convert non-ARC apps to ARC
interface
Edit>Refactor>Convert to Objective-C ARC
procedural programming language
NSObject
44. Zeroing weak referencing should be used for _____ and data sources to prevent inadvertent retain cycles
null
delegates
receiver
designated initializer
45. In object-oriented programming the ability of a superclass to pass its characteristics (methods and instance variables) on to its subclasses.
readonly
delegates
inheritance
namespace
46. Data types are divided into two main categories: integer and ______
C operators
class
implementation
floating-point
47. When creating a class header file you begin with the _____ keyword and close with the @end keyword
+
encapsulation
@implementation
@interface
48. ______ data types are always zero or greate
comma-separated
informal protocol
instance
Unsigned
49. Another name for a class that's defined solely so that other classes can inherit from it.
fields
abstract superclass
informal protocol
unitary
50. _____ allow you to add new methods to existing classes
Categories
zero
long long
cannot