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. 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.
event
outlet
encapsulation
init
2. 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.
instance
zero
namespace
category
3. 3 Common Float data types: float - _____ - CGFloat
copy
Pointers
%@
double
4. 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.
Protocols
binary
procedural programming language
id
5. A class that's one step above another class in the inheritance hierarchy; the class through which a subclass inherits methods and instance variables.
memory leak
Signed
superclass
readonly
6. 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.
init
pointer
abstract class
Edit>Refactor>Convert to Objective-C ARC
7. A compiler feature that provides automated memory management
C operators
cannot
ARC
adopt
8. There are ____ fundamental building blocks in Objective-C
binary
Binary
9
readonly
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.
Enumerations
class method
class object
id
10. Procedures (like verbs) are processes that manipulate or transform data and in Objective-C these 3 elements are _____ - functions and methods
C operators
runtime
doubles
procedures
11. Same as class object. (first way to say it.)
factory
instance variable
chars
developer intent
12. To destroy an object set the variable that points to it to _____
runtime
selector
namespace
nil
13. A _______ method is one that is likely to be unsupported in the future. It's use should be discontinued.
struct
asynchronous message
deprecated
interface
14. Property attribute that causes the setter to store a zeroing weak reference to the assigned value
nonatomic
weak
floating-point
Unsigned
15. Each class should have a ______ initializer a single method responsible for performing all of the object's setup and initialization.
runtime
Interface Builder
designated
delegate
16. 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.
init
Interface Builder
dispatch table
object
17. The process of setting or reading the value at an address pointed to by a pointer
class
anonymous object
zero
dereference (dereferencing)
18. The _____ function can be used to print a message to the console
ARC
printf( )
receiver
comma-separated
19. C-style strings always end with a ____ character
designated initializer
asterisk (*)
superclass
null
20. This symbol denotes a method as being a class method
ampersand (&)
Signed
+
procedural programming language
21. In object-oriented programming the ability of a superclass to pass its characteristics (methods and instance variables) on to its subclasses.
attributes
link time
%
inheritance
22. a++; is an example of using a _____ operator
unitary
class object
9
doubles
23. When creating a class implementation file you begin with the _____ keyword and close with the @end keyword
@implementation
memory leak
fields
dereference (dereferencing)
24. A language such as C that organizes a program as a set of procedures that have definite beginnings and ends.
dynamic allocation
-
procedural programming language
ARC
25. In the Objective-C language the declaration of a group of methods not associated with any particular class.
-
instance variable
nonatomic
protocol
26. Consider: [NSString alloc]. 'alloc' is an example of a(n) class method rather than a _______ method
ARC
instance
instance method
[receiver message];
27. _____ 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'.
double
Encapsulation
anonymous object
event
28. 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.
asynchronous message
interface
designated
framework
29. Property attribute that synthesizes only a getter for the property
readonly
heap
procedural programming language
formal protocol
30. 7 Common Integer data types: BOOL - char- short - int - long - _____ - NSInteger
object
message expression
chars
long long
31. An object in another application - one that's a potential receiver for a remote message.
NSObject
struct
remote object
abstract superclass
32. 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
Unsigned
designated initializer
class
reference counting
33. In object-oriented programming the ability of different objects to respond each in its own way - to the same message.
dynamic typing
memory leak
polymorphism
method
34. _____ allow indirect access and modification of a variable's value.
Pointers
developer intent
doubles
outlet
35. Finding the method implementation to invoke in response to the message
unitary
dynamic binding
double
readwrite
36. If you are compiling an application with ARC (Automatic reference Counting) you _______ store Objective-C objects inside a struct
framework
cannot
link time
asynchronous message
37. The most flexible C data type: ______
static typing
value
abstract superclass
struct
38. Objective-C methods are called using ____ _____
class
remote object
square brackets
receiver
39. In Objective-C floats are more commonly used than ______
Enumerations
doubles
chars
pointer
40. 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.
object
designated initializer
assign
NSString
41. A ____ _____ is where you forget to free up memory
message expression
developer intent
memory leak
assignment
42. Square bracket syntax for calling a method
instance
Unsigned
structures
[receiver message];
43. All objects are created on the _____
superset
Protocols
runtime
heap
44. Instance variables are optional in iOS if ________ are used
AppKit
method
properties
abstract class
45. _____ data types can be both positive and negative
selector
Signed
Binary
fields
46. In object-oriented programming the object that is sent a message.
receiver
encapsulation
protocol
inheritance
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.
mutex
-
NSObject
formal protocol
48. A struct may contain multiple ____ consisting of different data types
-
Pointers
fields
value
49. 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.
compile time
reference counting
Unitary
init
50. 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
%@
protocol
long long
conform