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 ____ ____ is a situation where you free memory and then accidentally continue to use it
instance variable
nonatomic
dangling pointer
nil
2. 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
structures
implementation
delegate
cannot
3. A prototype for a particular kind of object; declares instance variables and defines methods for all members of the class.
class
remote message
class
procedures
4. C-style strings always end with a ____ character
init
null
Unsigned
Edit>Refactor>Convert to Objective-C ARC
5. Xcode sequence to convert non-ARC apps to ARC
struct
unitary
Edit>Refactor>Convert to Objective-C ARC
Protocols
6. Consider: [NSString alloc]. 'alloc' is an example of a(n) class method rather than a _______ method
instance
designated initializer
dispatch table
message expression
7. In the Objective-C language the declaration of a group of methods not associated with any particular class.
Interface Builder
factory
[receiver message];
protocol
8. 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 variable
dynamic binding
[receiver message];
subclass
9. The first index in an array is valued at ____
Unitary
zero
precedence
runtime
10. Any class that's one step below another class in the inheritance hierarchy.
developer intent
subclass
null
procedural programming language
11. Placing a ____ before a normal variable name gives it's address
Cocoa
C operators
ampersand (&)
nil
12. Data types are divided into two main categories: integer and ______
delegate
method
class method
floating-point
13. A set of method definitions that is segregated from the rest of the class definition.
Unsigned
Interface Builder
square brackets
category
14. Zeroing weak referencing should be used for _____ and data sources to prevent inadvertent retain cycles
assign
delegates
instance
zero
15. Three main categories of more complicated data structures:_______ - arrays and structs
class object
pointers
null
ARC
16. 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.
runtime
reference counting
null
conform
17. Objective-C's protocols are really about communicating _____ _______
method
developer intent
struct
Pointers
18. The process of setting or reading the value at an address pointed to by a pointer
binary
properties
Signed
dereference (dereferencing)
19. Property attribute that causes the setter to store a strong reference to the assigned value
strong
superclass
object
binary
20. Discovering the class of an object at runtime rather than at compile time.
printf( )
dangling pointer
unitary
dynamic typing
21. The time after a program is launched and while it's running. Decisions made at during this time can be influenced by choices the user makes.
copy
runtime
Categories
9
22. Initializer method traditionally begin with the _____ prefix
class
abstract class
Unsigned
init
23. Property attribute that synthesizes both a getter and setter for the property
readwrite
superclass
nil
comma-separated
24. 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.
namespace
binary
factory
-
25. 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.
class
formal protocol
link time
class
26. 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
Unsigned
class method
superset
27. Each class should have a ______ initializer a single method responsible for performing all of the object's setup and initialization.
superclass
static typing
designated
formal protocol
28. Instance variables are optional in iOS if ________ are used
copy
class
designated
properties
29. _____ allow indirect access and modification of a variable's value.
Pointers
mutex
class
Unitary
30. This symbol denotes a method as being a class method
+
receiver
-
abstract superclass
31. Objective-C is a _____ of the C language
Unitary
heap
superset
runtime
32. 7 Common Integer data types: BOOL - char- short - int - long - _____ - NSInteger
pointers
selector
Cocoa
long long
33. In object-oriented programming the hierarchy of classes that's defined by the arrangement of superclasses and subclasses. Every class (except root classes such as NSObject) has a superclass and any class may have an unlimited number of subclasses.
formal protocol
subclass
inheritance hierarchy
instance
34. Property attribute where the setter stores the assigned value but does not perform any memory management.
assign
designated
precedence
assignment
35. Property attribute that synthesizes only a getter for the property
remote message
designated initializer
assignment
readonly
36. 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.
asynchronous message
instance
runtime
receiver
37. 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.
developer intent
precedence
link time
synchronous message
38. A language such as C that organizes a program as a set of procedures that have definite beginnings and ends.
Unsigned
Cocoa
nonatomic
procedural programming language
39. When creating a class header file you begin with the _____ keyword and close with the @end keyword
@interface
structures
Encapsulation
namespace
40. _____ 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'.
delegate
C operators
Encapsulation
structures
41. An object that acts on behalf of another object.
delegate
procedures
class method
%@
42. A _______ method is one that is likely to be unsupported in the future. It's use should be discontinued.
Pointers
deprecated
%
double
43. Objective-C borrows much of its syntax from ______ one of the earliest object-oriented languages
doubles
delegate
Smalltalk
Encapsulation
44. A struct may contain multiple ____ consisting of different data types
NSObject
instance variable
asterisk (*)
fields
45. A ____ _____ is where you forget to free up memory
+
memory leak
asterisk (*)
dereference (dereferencing)
46. Finding the method implementation to invoke in response to the message
dynamic allocation
strong
dynamic binding
abstract class
47. An object of unknown class. Interface is published through protocol declaration.
ARC
distributed objects
-
anonymous object
48. a+b; is an example of using a _____ operator
dynamic binding
binary
adopt
heap
49. A protocol declared as a category usually as a category of the NSObject class.
nil
informal protocol
Product>Profile>Leaks>Profile
Cocoa
50. The nine fundamental building blocks of Objective-C can be dividing into 2 categories: data and _______
procedures
runtime
Interface Builder
dynamic typing