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. Protocols are adopted by adding a ____________ list of protocols inside angled brackets after the superclass declaration in a class's @interface block
comma-separated
dispatch table
inheritance
properties
2. 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
C operators
method
id
3. Each class should have a ______ initializer a single method responsible for performing all of the object's setup and initialization.
Categories
designated
dangling pointer
factory
4. The _____ function can be used to print a message to the console
procedural programming language
pointer
readonly
printf( )
5. _____ data types can be both positive and negative
memory leak
factory object
Signed
9
6. This symbol denotes a method as being an instance method
double
value
informal protocol
-
7. Property attribute that synthesizes both a getter and setter for the property
conform
readwrite
NSString
method
8. 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.
deprecated
inheritance hierarchy
reference counting
asterisk (*)
9. A ____ ____ is a situation where you free memory and then accidentally continue to use it
class object
dangling pointer
Unsigned
Product>Profile>Leaks>Profile
10. A language such as C that organizes a program as a set of procedures that have definite beginnings and ends.
message
%@
remote object
procedural programming language
11. When creating a class implementation file you begin with the _____ keyword and close with the @end keyword
heap
inheritance
dangling pointer
@implementation
12. Square bracket syntax for calling a method
heap
asterisk (*)
runtime
[receiver message];
13. A compiler feature that provides automated memory management
runtime
object
protocol
ARC
14. The root class in Objective-C
compile time
subclass
%@
NSObject
15. In computer science the mathematical concept of 'order of operations' is known as the 'order of ______'
precedence
nonatomic
link time
Unsigned
16. An advanced object-oriented development platform in Mac OS X; a set of frameworks whose primary programming interfaces are in Objective-C.
assign
Cocoa
memory leak
runtime
17. A message sent from one application to an object in another application.
remote message
Smalltalk
developer intent
readwrite
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).
printf( )
polymorphism
implementation
asynchronous message
19. _____ operators take 2 operands
asterisk (*)
Binary
NSString
designated initializer
20. A set of method definitions that is segregated from the rest of the class definition.
Pointers
category
delegate
struct
21. Pointers are declared by placing a(n) ___ between the type declaration and the variable name
asterisk (*)
binary
runtime
structures
22. 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.
selector
delegate
class method
class
23. Objective-C's protocols are really about communicating _____ _______
developer intent
strong
factory object
abstract class
24. Objective-C methods are called using ____ _____
procedural programming language
square brackets
weak
NSString
25. Property attribute that synthesizes accessors that are not thread safe
nonatomic
doubles
encapsulation
factory object
26. An object id with a value of 0.
nil
%
namespace
AppKit
27. 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.
Categories
dynamic allocation
asynchronous message
readonly
28. All objects are created on the _____
Edit>Refactor>Convert to Objective-C ARC
floating-point
heap
struct
29. A prototype for a particular kind of object; declares instance variables and defines methods for all members of the class.
dynamic allocation
Edit>Refactor>Convert to Objective-C ARC
memory leak
class
30. 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
dispatch table
abstract superclass
pointer
conform
31. Giving the compiler information about what kind of object an instance is - by typing it as a pointer to a class.
static typing
adopt
instance
distributed objects
32. 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.
NSObject
struct
runtime
object
33. Same as class object. (first way to say it.)
developer intent
factory
message expression
struct
34. 7 Common Integer data types: BOOL - char- short - int - long - _____ - NSInteger
nil
long long
attributes
nil
35. Consider: [NSString alloc]. 'alloc' is an example of a(n) class method rather than a _______ method
dangling pointer
id
NSString
instance
36. Finding the method implementation to invoke in response to the message
dynamic binding
strong
%@
Protocols
37. ARC is susceptible to retain _____
pointers
message expression
cycles
init
38. Initializer method traditionally begin with the _____ prefix
init
dangling pointer
designated
implementation
39. A way to package a logically related set of classes & protocols and functions together with localized strings & online documentation and other pertinent files.
dispatch table
framework
subclass
category
40. Property attribute that causes the setter to store a strong reference to the assigned value
strong
Cocoa
cannot
namespace
41. A ____ _____ is where you forget to free up memory
instance method
attributes
link time
memory leak
42. 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.
unitary
namespace
Pointers
reference counting
43. Any method that can be used by an instance of a class rather than by the class object.
event
encapsulation
instance method
superclass
44. Objective-C objects should use strong or weak ______
attributes
implementation
nil
@interface
45. A struct may contain multiple ____ consisting of different data types
%@
receiver
fields
protocol
46. The part of an Objective-C class specification that declares its public interface which includes its superclass name & instances variables and public-method prototypes.
interface
NSObject
Interface Builder
object
47. In object-oriented programming the ability of different objects to respond each in its own way - to the same message.
polymorphism
category
message
mutex
48. 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.
encapsulation
mutex
designated initializer
fields
49. Property attribute that causes the setter to store a copy of the assigned value
Smalltalk
attributes
copy
long long
50. In the Objective-C language the declaration of a group of methods not associated with any particular class.
conform
static typing
zero
protocol