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. In object-oriented programming the ability of a superclass to pass its characteristics (methods and instance variables) on to its subclasses.
remote object
Enumerations
nil
inheritance
2. Initializer method traditionally begin with the _____ prefix
init
dereference (dereferencing)
assign
procedures
3. 7 Common Integer data types: BOOL - char- short - int - long - _____ - NSInteger
pointers
long long
implementation
namespace
4. When creating a class header file you begin with the _____ keyword and close with the @end keyword
@interface
cannot
designated
NSObject
5. _____ 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'.
Encapsulation
Signed
message
class
6. In object-oriented programming a procedure that can be executed by an object.
method
designated initializer
reference counting
fields
7. Instance variables are optional in iOS if ________ are used
properties
null
dynamic typing
category
8. An object id with a value of 0.
NSString
fields
nil
Interface Builder
9. 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).
message expression
dispatch table
binary
Unsigned
10. 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.
doubles
event
Interface Builder
compile time
11. Xcode sequence to convert non-ARC apps to ARC
Edit>Refactor>Convert to Objective-C ARC
anonymous object
NSString
inheritance
12. If you are compiling an application with ARC (Automatic reference Counting) you _______ store Objective-C objects inside a struct
instance
cannot
class
asterisk (*)
13. 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.
Binary
Pointers
conform
runtime
14. In a home building analogy a ____ is the blueprint and the object is the house
superclass
Smalltalk
class
structures
15. Three main categories of more complicated data structures:_______ - arrays and structs
pointers
dynamic typing
chars
dispatch table
16. 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
readwrite
conform
link time
assignment
17. An architecture that facilitates communication between objects in different address spaces.
structures
distributed objects
Smalltalk
dynamic allocation
18. Objective-C objects should use strong or weak ______
comma-separated
attributes
synchronous message
factory object
19. The time when source code is compiled; constrained by the amount and kind of information encoded in source files.
compile time
Interface Builder
-
long long
20. 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.
@interface
implementation
double
outlet
21. A class is said to do this when it declares that it implements all the methods in the protocol.
mutex
adopt
compile time
subclass
22. Objective-C methods are called using ____ _____
structures
mutex
runtime
square brackets
23. _____ allow indirect access and modification of a variable's value.
factory object
Pointers
weak
readonly
24. Property attribute that causes the setter to store a copy of the assigned value
copy
readonly
double
superset
25. An object that acts on behalf of another object.
subclass
factory
delegate
dynamic typing
26. The name of a method when it's used in a source-code message to an object or the unique identifier that replaces the name when the source code is compiled.
message
precedence
selector
nil
27. A prototype for a particular kind of object; declares instance variables and defines methods for all members of the class.
superset
init
class
receiver
28. A message sent from one application to an object in another application.
asynchronous message
factory object
remote message
delegate
29. 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
designated
procedural programming language
assignment
structures
30. The nine fundamental building blocks of Objective-C can be dividing into 2 categories: data and _______
factory object
procedures
init
Categories
31. 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
delegates
init
category
32. 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.
dynamic typing
instance variable
NSString
implementation
33. 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.
Smalltalk
AppKit
instance
remote message
34. The direct or indirect report of external activity especially user activity on the keyboard and mouse.
binary
event
nonatomic
dangling pointer
35. Objective-C is a _____ of the C language
superset
nil
nonatomic
receiver
36. The 6 main categories of operators are: ____ - arithmetic - comparison - logical - bitwise and membership
cycles
asterisk (*)
long long
assignment
37. A struct may contain multiple ____ consisting of different data types
fields
message
nil
framework
38. A way to package a logically related set of classes & protocols and functions together with localized strings & online documentation and other pertinent files.
dynamic typing
framework
dynamic allocation
abstract superclass
39. Zeroing weak referencing should be used for _____ and data sources to prevent inadvertent retain cycles
delegates
Binary
Edit>Refactor>Convert to Objective-C ARC
assign
40. Pointers are declared by placing a(n) ___ between the type declaration and the variable name
unitary
link time
static typing
asterisk (*)
41. Finding the method implementation to invoke in response to the message
synchronous message
dynamic binding
[receiver message];
attributes
42. Protocols are adopted by adding a ____________ list of protocols inside angled brackets after the superclass declaration in a class's @interface block
comma-separated
properties
readwrite
link time
43. Consider: [NSString alloc]. 'alloc' is an example of a(n) class method rather than a _______ method
+
double
instance
method
44. Objective-C borrows much of its syntax from ______ one of the earliest object-oriented languages
nil
factory
binary
Smalltalk
45. Each class should have a ______ initializer a single method responsible for performing all of the object's setup and initialization.
designated
Protocols
NSString
readwrite
46. Objective-C's protocols are really about communicating _____ _______
factory
developer intent
reference counting
instance
47. Xcode sequence to examine an app for memory leaks or retain cycles
Product>Profile>Leaks>Profile
event
Cocoa
Categories
48. The _____ function can be used to print a message to the console
binary
NSObject
precedence
printf( )
49. There are ____ fundamental building blocks in Objective-C
long long
instance variable
conform
9
50. Property attribute that synthesizes only a getter for the property
value
readonly
strong
instance method