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. C-style strings are stored in an array of _____
dispatch table
init
chars
[receiver message];
2. An object in another application - one that's a potential receiver for a remote message.
Unitary
assignment
Binary
remote object
3. 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).
interface
event
double
message expression
4. Objective-C methods are called using ____ _____
C operators
object
square brackets
9
5. 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.
instance
floating-point
instance variable
selector
6. Each class should have a ______ initializer a single method responsible for performing all of the object's setup and initialization.
dangling pointer
distributed objects
designated
Binary
7. In object-oriented programming the ability of a superclass to pass its characteristics (methods and instance variables) on to its subclasses.
inheritance
binary
factory object
unitary
8. Symbol used to denote a placeholder in a format string
dynamic typing
synchronous message
nonatomic
%
9. Placing a ____ before a normal variable name gives it's address
ampersand (&)
dynamic typing
Cocoa
double
10. Xcode sequence to convert non-ARC apps to ARC
remote message
nil
Edit>Refactor>Convert to Objective-C ARC
ARC
11. _____ allow indirect access and modification of a variable's value.
Pointers
Product>Profile>Leaks>Profile
Interface Builder
double
12. All objects are created on the _____
abstract superclass
heap
method
Binary
13. To destroy an object set the variable that points to it to _____
chars
nil
structures
encapsulation
14. a+b; is an example of using a _____ operator
factory
binary
message expression
nonatomic
15. An object of unknown class. Interface is published through protocol declaration.
polymorphism
category
anonymous object
NSObject
16. Objective-C's protocols are really about communicating _____ _______
AppKit
copy
developer intent
id
17. A class is said to do this when it declares that it implements all the methods in the protocol.
runtime
instance method
adopt
@implementation
18. 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).
informal protocol
strong
NSObject
implementation
19. Three main categories of more complicated data structures:_______ - arrays and structs
namespace
pointers
remote object
heap
20. Protocols are adopted by adding a ____________ list of protocols inside angled brackets after the superclass declaration in a class's @interface block
factory object
comma-separated
reference counting
fields
21. When creating a class header file you begin with the _____ keyword and close with the @end keyword
attributes
@interface
Cocoa
9
22. 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.
designated initializer
dynamic allocation
asterisk (*)
assign
23. Another name for a class that's defined solely so that other classes can inherit from it.
ampersand (&)
abstract superclass
polymorphism
value
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
floating-point
Categories
asterisk (*)
25. A ____ _____ is where you forget to free up memory
struct
long long
memory leak
Encapsulation
26. 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
readwrite
encapsulation
27. Property attribute that causes the setter to store a zeroing weak reference to the assigned value
Categories
synchronous message
weak
class
28. Initializer method traditionally begin with the _____ prefix
superclass
synchronous message
init
distributed objects
29. Property attribute that causes the setter to store a strong reference to the assigned value
formal protocol
NSString
strong
-
30. 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.
event
dangling pointer
AppKit
outlet
31. Property attribute that synthesizes only a getter for the property
reference counting
readonly
floating-point
encapsulation
32. Consider: [NSString alloc]. 'alloc' is an example of a(n) class method rather than a _______ method
instance
Binary
cycles
doubles
33. In a format string the place holder for an object is ______
Enumerations
unitary
double
%@
34. Same as class object. (first way to say it.)
instance
factory
informal protocol
ARC
35. A ____ ____ is a situation where you free memory and then accidentally continue to use it
dispatch table
dangling pointer
synchronous message
dynamic typing
36. The 6 main categories of operators are: ____ - arithmetic - comparison - logical - bitwise and membership
assignment
chars
nonatomic
precedence
37. _____ data types can be both positive and negative
printf( )
Signed
protocol
procedures
38. The time when source code is compiled; constrained by the amount and kind of information encoded in source files.
procedural programming language
asynchronous message
compile time
cycles
39. A remote message that doesn't return until the receiving application finishes responding to the message. Because the application that sends the message waits for an acknowledgment or return information from the receiving application - the two applica
factory
synchronous message
Protocols
class object
40. Data types are divided into two main categories: integer and ______
floating-point
Unitary
doubles
procedures
41. Xcode sequence to examine an app for memory leaks or retain cycles
readwrite
pointer
Product>Profile>Leaks>Profile
static typing
42. Rather than using arrays in Objective-C we often are able to use it's collection classes of NSArray - NSSet and NSDictionary with _____ for strings
strong
conform
adopt
NSString
43. A variable that points to the memory address of another value
NSObject
compile time
value
pointer
44. The most flexible C data type: ______
struct
object
nil
Binary
45. A language such as C that organizes a program as a set of procedures that have definite beginnings and ends.
procedural programming language
readonly
readwrite
method
46. In object-oriented programming a procedure that can be executed by an object.
developer intent
method
instance method
long long
47. 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.
binary
instance
selector
zero
48. The process of setting or reading the value at an address pointed to by a pointer
dereference (dereferencing)
method
memory leak
long long
49. 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
%@
Product>Profile>Leaks>Profile
conform
cycles
50. _____ allow you to add new methods to existing classes
null
Unsigned
Categories
delegate