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. Property attribute where the setter stores the assigned value but does not perform any memory management.
NSObject
square brackets
assign
cannot
2. Procedures (like verbs) are processes that manipulate or transform data and in Objective-C these 3 elements are _____ - functions and methods
properties
nil
C operators
id
3. An object in another application - one that's a potential receiver for a remote message.
remote object
Smalltalk
null
ARC
4. 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
Protocols
@interface
conform
ARC
5. 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.
mutex
runtime
Interface Builder
nil
6. Square bracket syntax for calling a method
[receiver message];
informal protocol
long long
Signed
7. Symbol used to denote a placeholder in a format string
instance method
event
%
[receiver message];
8. 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.
designated initializer
square brackets
reference counting
nil
9. A class that's one step above another class in the inheritance hierarchy; the class through which a subclass inherits methods and instance variables.
copy
superclass
C operators
dereference (dereferencing)
10. A compiler feature that provides automated memory management
class
superclass
factory object
ARC
11. Property attribute that causes the setter to store a zeroing weak reference to the assigned value
AppKit
weak
factory
id
12. A struct may contain multiple ____ consisting of different data types
Product>Profile>Leaks>Profile
dynamic typing
fields
weak
13. Zeroing weak referencing should be used for _____ and data sources to prevent inadvertent retain cycles
instance variable
polymorphism
Product>Profile>Leaks>Profile
delegates
14. The part of an Objective-C class specification that declares its public interface which includes its superclass name & instances variables and public-method prototypes.
weak
Protocols
interface
double
15. A method that can operate on class objects rather than instances of the class.
fields
class method
class
pointer
16. When creating a class header file you begin with the _____ keyword and close with the @end keyword
instance variable
@implementation
@interface
null
17. Pointers are declared by placing a(n) ___ between the type declaration and the variable name
method
asterisk (*)
Unsigned
doubles
18. Another name for a class that's defined solely so that other classes can inherit from it.
value
dynamic allocation
abstract superclass
assignment
19. Initializer method traditionally begin with the _____ prefix
init
anonymous object
Enumerations
reference counting
20. 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.
selector
distributed objects
pointers
formal protocol
21. 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.
instance
interface
Encapsulation
selector
22. A ____ _____ is where you forget to free up memory
compile time
Pointers
dynamic typing
memory leak
23. An object id with a value of 0.
nil
asynchronous message
instance
adopt
24. C-style strings are stored in an array of _____
category
class
inheritance hierarchy
chars
25. Giving the compiler information about what kind of object an instance is - by typing it as a pointer to a class.
runtime
dynamic binding
abstract class
static typing
26. 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
+
event
C operators
27. In C all functions pass their arguments by ____ which means the compiler makes local copies of those arguments
+
long long
value
encapsulation
28. Objective-C borrows much of its syntax from ______ one of the earliest object-oriented languages
message expression
formal protocol
Smalltalk
dangling pointer
29. In the Objective-C language the declaration of a group of methods not associated with any particular class.
null
event
protocol
designated
30. In Objective-C floats are more commonly used than ______
implementation
delegates
doubles
instance
31. 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.
dispatch table
subclass
dynamic binding
instance
32. 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.
Unitary
inheritance hierarchy
fields
subclass
33. Each class should have a ______ initializer a single method responsible for performing all of the object's setup and initialization.
outlet
designated
binary
subclass
34. An advanced object-oriented development platform in Mac OS X; a set of frameworks whose primary programming interfaces are in Objective-C.
id
Enumerations
assign
Cocoa
35. _____ data types can be both positive and negative
comma-separated
readonly
Signed
ampersand (&)
36. Property attribute that causes the setter to store a copy of the assigned value
dynamic typing
Encapsulation
inheritance hierarchy
copy
37. The first index in an array is valued at ____
+
zero
ampersand (&)
floating-point
38. In object-oriented programming the ability of a superclass to pass its characteristics (methods and instance variables) on to its subclasses.
@interface
superset
inheritance
dangling pointer
39. ____ provide a concise & elegant method for defining a discrete set of values
reference counting
value
Enumerations
instance variable
40. 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).
%@
fields
pointers
implementation
41. 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.
dynamic allocation
Signed
cycles
namespace
42. _____ operators take 2 operands
C operators
Binary
adopt
remote message
43. An object of unknown class. Interface is published through protocol declaration.
anonymous object
Unitary
Signed
ampersand (&)
44. ______ operators take a single operand
Unsigned
inheritance hierarchy
long long
Unitary
45. The _____ function can be used to print a message to the console
delegates
dispatch table
Unitary
printf( )
46. 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.
value
method
selector
namespace
47. Placing a ____ before a normal variable name gives it's address
interface
ampersand (&)
Edit>Refactor>Convert to Objective-C ARC
remote object
48. a+b; is an example of using a _____ operator
superclass
binary
weak
id
49. 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.
id
procedural programming language
mutex
static typing
50. Objective-C methods are called using ____ _____
inheritance hierarchy
square brackets
mutex
binary