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. ARC is susceptible to retain _____
comma-separated
subclass
dereference (dereferencing)
cycles
2. Objective-C objects should use strong or weak ______
attributes
fields
class
compile time
3. Property attribute where the setter stores the assigned value but does not perform any memory management.
remote message
precedence
assign
init
4. Objective-C's protocols are really about communicating _____ _______
encapsulation
fields
copy
developer intent
5. Initializer method traditionally begin with the _____ prefix
Edit>Refactor>Convert to Objective-C ARC
struct
init
-
6. In C all functions pass their arguments by ____ which means the compiler makes local copies of those arguments
value
inheritance hierarchy
structures
runtime
7. Objective-C binds methods and arguments at _____ instead of compile time
copy
runtime
Interface Builder
designated initializer
8. Objective-C borrows much of its syntax from ______ one of the earliest object-oriented languages
dynamic allocation
Smalltalk
instance method
protocol
9. 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.
AppKit
ARC
designated initializer
encapsulation
10. Protocols are adopted by adding a ____________ list of protocols inside angled brackets after the superclass declaration in a class's @interface block
C operators
encapsulation
comma-separated
asynchronous message
11. Property attribute that synthesizes only a getter for the property
struct
null
readonly
method
12. Data types are divided into two main categories: integer and ______
floating-point
zero
-
Interface Builder
13. In computer science the mathematical concept of 'order of operations' is known as the 'order of ______'
precedence
runtime
pointer
properties
14. 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.
inheritance hierarchy
assignment
id
binary
15. A compiler feature that provides automated memory management
ARC
dangling pointer
remote object
instance method
16. ______ data types are always zero or greate
Encapsulation
instance
Unsigned
implementation
17. The root class in Objective-C
outlet
weak
NSObject
doubles
18. There are ____ fundamental building blocks in Objective-C
designated initializer
runtime
9
compile time
19. 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.
reference counting
Encapsulation
doubles
outlet
20. A prototype for a particular kind of object; declares instance variables and defines methods for all members of the class.
[receiver message];
class
floating-point
remote object
21. Consider: [NSString alloc]. 'alloc' is an example of a(n) class method rather than a _______ method
instance
Unsigned
-
procedural programming language
22. The process of setting or reading the value at an address pointed to by a pointer
Edit>Refactor>Convert to Objective-C ARC
designated initializer
nonatomic
dereference (dereferencing)
23. Xcode sequence to convert non-ARC apps to ARC
Edit>Refactor>Convert to Objective-C ARC
nil
cycles
@interface
24. The 6 main categories of operators are: ____ - arithmetic - comparison - logical - bitwise and membership
instance variable
assignment
%
remote object
25. 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.
framework
Edit>Refactor>Convert to Objective-C ARC
link time
runtime
26. Another name for a class that's defined solely so that other classes can inherit from it.
dispatch table
nil
strong
abstract superclass
27. C-style strings always end with a ____ character
null
ARC
[receiver message];
compile time
28. The most flexible C data type: ______
comma-separated
mutex
framework
struct
29. 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
compile time
designated
factory
30. 7 Common Integer data types: BOOL - char- short - int - long - _____ - NSInteger
Encapsulation
long long
Pointers
instance
31. 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.
readonly
asynchronous message
dynamic allocation
adopt
32. 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.
long long
receiver
pointers
namespace
33. 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.
Interface Builder
square brackets
encapsulation
inheritance
34. Short for mutual exclusion semaphore. An object used to synchronize thread execution.
assign
instance
null
mutex
35. A ____ ____ is a situation where you free memory and then accidentally continue to use it
informal protocol
memory leak
dangling pointer
method
36. Property attribute that synthesizes accessors that are not thread safe
struct
informal protocol
pointer
nonatomic
37. _____ data types can be both positive and negative
anonymous object
zero
%@
Signed
38. Instance variables are optional in iOS if ________ are used
attributes
category
properties
factory
39. In a home building analogy a ____ is the blueprint and the object is the house
asynchronous message
class
%
init
40. _____ allow you to add new methods to existing classes
Edit>Refactor>Convert to Objective-C ARC
Protocols
Categories
[receiver message];
41. A way to package a logically related set of classes & protocols and functions together with localized strings & online documentation and other pertinent files.
dangling pointer
fields
polymorphism
framework
42. An object id with a value of 0.
value
nil
inheritance hierarchy
Enumerations
43. a+b; is an example of using a _____ operator
zero
binary
[receiver message];
class method
44. Procedures (like verbs) are processes that manipulate or transform data and in Objective-C these 3 elements are _____ - functions and methods
C operators
Protocols
static typing
asterisk (*)
45. 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.
chars
Interface Builder
properties
assign
46. Symbol used to denote a placeholder in a format string
pointer
%
encapsulation
cycles
47. 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.
Product>Profile>Leaks>Profile
mutex
adopt
id
48. 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.
remote message
instance variable
selector
floating-point
49. A class that's one step above another class in the inheritance hierarchy; the class through which a subclass inherits methods and instance variables.
abstract superclass
method
superclass
namespace
50. _____ 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'.
readonly
factory
nonatomic
Encapsulation