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. The _____ function can be used to print a message to the console
floating-point
double
printf( )
nil
2. 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.
runtime
ARC
id
9
3. Pointers are declared by placing a(n) ___ between the type declaration and the variable name
asterisk (*)
-
Smalltalk
runtime
4. Instance variables are optional in iOS if ________ are used
delegates
synchronous message
Signed
properties
5. Procedures (like verbs) are processes that manipulate or transform data and in Objective-C these 3 elements are _____ - functions and methods
C operators
Categories
+
heap
6. 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).
9
procedures
structures
message expression
7. The init... method that has primary responsibility for initializing new instances of a class. Each class defines or inherits its own. Through messages to self other init... methods in the same class directly or indirectly invoke it and then it - thro
designated initializer
9
NSObject
class method
8. Zeroing weak referencing should be used for _____ and data sources to prevent inadvertent retain cycles
delegates
properties
Binary
AppKit
9. 3 Common Float data types: float - _____ - CGFloat
Unitary
double
dynamic allocation
floating-point
10. ______ data types are always zero or greate
init
NSObject
Unsigned
class object
11. To destroy an object set the variable that points to it to _____
asterisk (*)
@implementation
pointer
nil
12. A message sent from one application to an object in another application.
NSString
nonatomic
remote message
pointer
13. Property attribute that synthesizes only a getter for the property
Enumerations
instance
designated
readonly
14. 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.
message
-
synchronous message
instance
15. a+b; is an example of using a _____ operator
distributed objects
binary
factory
Enumerations
16. In C all functions pass their arguments by ____ which means the compiler makes local copies of those arguments
asynchronous message
value
memory leak
@interface
17. All objects are created on the _____
asterisk (*)
unitary
designated
heap
18. An advanced object-oriented development platform in Mac OS X; a set of frameworks whose primary programming interfaces are in Objective-C.
Binary
floating-point
nonatomic
Cocoa
19. Property attribute that causes the setter to store a strong reference to the assigned value
strong
nil
dynamic binding
encapsulation
20. Same as class object. (first way to say it.)
instance
attributes
factory
object
21. Objective-C borrows much of its syntax from ______ one of the earliest object-oriented languages
instance variable
C operators
framework
Smalltalk
22. In object-oriented programming the ability of a superclass to pass its characteristics (methods and instance variables) on to its subclasses.
method
Product>Profile>Leaks>Profile
inheritance
abstract class
23. 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.
object
chars
runtime
@interface
24. Placing a ____ before a normal variable name gives it's address
doubles
Protocols
NSString
ampersand (&)
25. 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.
class
%@
message
asynchronous message
26. _____ allow indirect access and modification of a variable's value.
developer intent
Pointers
factory
strong
27. 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
zero
memory leak
instance method
28. _____ data types can be both positive and negative
long long
Signed
asterisk (*)
9
29. An object of unknown class. Interface is published through protocol declaration.
class method
anonymous object
method
factory
30. 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.
object
Unsigned
dynamic allocation
dereference (dereferencing)
31. There are ____ fundamental building blocks in Objective-C
properties
adopt
9
instance method
32. The part of an Objective-C class specification that declares its public interface which includes its superclass name & instances variables and public-method prototypes.
inheritance hierarchy
interface
developer intent
nonatomic
33. The 6 main categories of operators are: ____ - arithmetic - comparison - logical - bitwise and membership
assignment
instance method
fields
weak
34. A class is said to do this when it declares that it implements all the methods in the protocol.
formal protocol
interface
selector
adopt
35. ____ provide a concise & elegant method for defining a discrete set of values
cycles
asterisk (*)
category
Enumerations
36. 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
unitary
inheritance hierarchy
instance variable
37. The Objective-C runtime table that contains entries that associate method selectors with the class-specific addresses of the methods they identify.
dispatch table
comma-separated
9
floating-point
38. 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.
Unitary
nil
mutex
outlet
39. 7 Common Integer data types: BOOL - char- short - int - long - _____ - NSInteger
Protocols
long long
assignment
interface
40. Protocols are adopted by adding a ____________ list of protocols inside angled brackets after the superclass declaration in a class's @interface block
abstract superclass
comma-separated
Unsigned
copy
41. A struct may contain multiple ____ consisting of different data types
properties
-
fields
formal protocol
42. A variable that points to the memory address of another value
message
long long
pointer
doubles
43. In object-oriented programming the object that is sent a message.
encapsulation
heap
instance
receiver
44. Any method that can be used by an instance of a class rather than by the class object.
nonatomic
implementation
instance method
compile time
45. a++; is an example of using a _____ operator
designated
unitary
init
+
46. In object-oriented programming a procedure that can be executed by an object.
readonly
method
Protocols
procedural programming language
47. A protocol declared as a category usually as a category of the NSObject class.
+
runtime
nil
informal protocol
48. Another name for a class that's defined solely so that other classes can inherit from it.
cannot
conform
class object
abstract superclass
49. In a format string the place holder for an object is ______
%@
floating-point
NSString
remote object
50. 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
nil
abstract superclass
instance method
structures