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. A prototype for a particular kind of object; declares instance variables and defines methods for all members of the class.
class
developer intent
pointers
fields
2. Consider: [NSString alloc]. 'alloc' is an example of a(n) class method rather than a _______ method
instance
class
procedural programming language
weak
3. Three main categories of more complicated data structures:_______ - arrays and structs
instance
Encapsulation
pointers
encapsulation
4. Xcode sequence to convert non-ARC apps to ARC
Edit>Refactor>Convert to Objective-C ARC
C operators
synchronous message
superset
5. In object-oriented programming the ability of a superclass to pass its characteristics (methods and instance variables) on to its subclasses.
inheritance
dynamic allocation
printf( )
formal protocol
6. The _____ function can be used to print a message to the console
abstract class
deprecated
printf( )
dynamic typing
7. The root class in Objective-C
NSObject
pointer
protocol
anonymous object
8. Symbol used to denote a placeholder in a format string
9
readonly
%
class method
9. Objective-C is a _____ of the C language
superset
procedures
asynchronous message
remote message
10. _____ allow you to add new methods to existing classes
heap
object
receiver
Categories
11. All objects are created on the _____
instance
heap
delegate
9
12. Xcode sequence to examine an app for memory leaks or retain cycles
Product>Profile>Leaks>Profile
NSObject
namespace
precedence
13. Pointers are declared by placing a(n) ___ between the type declaration and the variable name
Pointers
nil
procedural programming language
asterisk (*)
14. A protocol declared as a category usually as a category of the NSObject class.
precedence
compile time
informal protocol
NSObject
15. Objective-C objects should use strong or weak ______
attributes
Cocoa
formal protocol
id
16. 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).
Signed
fields
factory object
message expression
17. Property attribute that synthesizes both a getter and setter for the property
category
readwrite
cannot
delegates
18. Each class should have a ______ initializer a single method responsible for performing all of the object's setup and initialization.
designated
unitary
Interface Builder
double
19. In object-oriented programming - the method selector (name) and accompanying parameters that tell the receiving object in a message expression what to do.
fields
assign
init
message
20. A way to package a logically related set of classes & protocols and functions together with localized strings & online documentation and other pertinent files.
selector
inheritance hierarchy
Smalltalk
framework
21. Instance variables are optional in iOS if ________ are used
Protocols
id
properties
static typing
22. In C all functions pass their arguments by ____ which means the compiler makes local copies of those arguments
struct
value
assignment
doubles
23. _____ allow indirect access and modification of a variable's value.
selector
nonatomic
Pointers
NSObject
24. 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.
Categories
outlet
Pointers
NSString
25. 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
ampersand (&)
readwrite
encapsulation
26. In object-oriented programming a procedure that can be executed by an object.
method
deprecated
link time
class
27. The time when files compiled from different source modules are linked into a single program. Decisions made by the linker are constrained by the compiled code and ultimately by the information contained in source code.
abstract class
Encapsulation
link time
remote message
28. Objective-C binds methods and arguments at _____ instead of compile time
strong
runtime
null
assignment
29. Finding the method implementation to invoke in response to the message
structures
binary
nonatomic
dynamic binding
30. A variable that points to the memory address of another value
pointer
category
+
cannot
31. In object-oriented programming the ability of different objects to respond each in its own way - to the same message.
factory
chars
strong
polymorphism
32. Property attribute that causes the setter to store a copy of the assigned value
runtime
copy
dynamic allocation
dereference (dereferencing)
33. A method that can operate on class objects rather than instances of the class.
namespace
pointers
factory
class method
34. In object-oriented programming the object that is sent a message.
class object
runtime
receiver
object
35. Objective-C's protocols are really about communicating _____ _______
binary
abstract class
developer intent
Protocols
36. 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.
[receiver message];
runtime
asynchronous message
attributes
37. 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.
comma-separated
instance
printf( )
procedures
38. C-style strings always end with a ____ character
dynamic binding
instance
null
dynamic typing
39. 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
instance variable
conform
Enumerations
40. 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.
precedence
9
Interface Builder
interface
41. 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
method
strong
factory
42. 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.
asynchronous message
C operators
Enumerations
class method
43. _____ data types can be both positive and negative
instance
Signed
nonatomic
ampersand (&)
44. 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.
NSObject
interface
outlet
class object
45. 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
procedural programming language
[receiver message];
abstract class
46. 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
class method
Enumerations
remote object
designated initializer
47. 3 Common Float data types: float - _____ - CGFloat
long long
double
nonatomic
designated initializer
48. Initializer method traditionally begin with the _____ prefix
init
weak
%
dangling pointer
49. To destroy an object set the variable that points to it to _____
static typing
nil
instance variable
structures
50. 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.
formal protocol
Unsigned
copy
nil