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. Each class should have a ______ initializer a single method responsible for performing all of the object's setup and initialization.
receiver
abstract class
selector
designated
2. 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
unitary
nil
class object
3. Property attribute that causes the setter to store a copy of the assigned value
copy
interface
Unitary
readwrite
4. 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.
AppKit
runtime
@interface
zero
5. 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.
chars
link time
dispatch table
pointer
6. 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.
Cocoa
inheritance hierarchy
informal protocol
Encapsulation
7. 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
instance method
dynamic allocation
[receiver message];
8. A protocol declared as a category usually as a category of the NSObject class.
Categories
instance method
informal protocol
Binary
9. 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.
Cocoa
Protocols
Interface Builder
mutex
10. 3 Common Float data types: float - _____ - CGFloat
assign
pointer
double
inheritance
11. To destroy an object set the variable that points to it to _____
nil
weak
precedence
synchronous message
12. The part of an Objective-C class specification that declares its public interface which includes its superclass name & instances variables and public-method prototypes.
%
factory object
interface
class
13. a++; is an example of using a _____ operator
structures
informal protocol
unitary
memory leak
14. 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.
static typing
structures
namespace
implementation
15. ____ provide a concise & elegant method for defining a discrete set of values
delegate
copy
designated
Enumerations
16. In object-oriented programming the ability of different objects to respond each in its own way - to the same message.
printf( )
polymorphism
pointer
unitary
17. 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
9
C operators
remote object
18. Any variable that's part of the internal data structure of an instance; declared in a class definition and become part of all objects that are members of or inherit from the class.
instance variable
fields
compile time
strong
19. Xcode sequence to examine an app for memory leaks or retain cycles
Product>Profile>Leaks>Profile
link time
nonatomic
category
20. Objective-C's protocols are really about communicating _____ _______
developer intent
procedural programming language
NSObject
asynchronous message
21. In a home building analogy a ____ is the blueprint and the object is the house
class
conform
abstract class
nil
22. Objective-C binds methods and arguments at _____ instead of compile time
superset
@interface
init
runtime
23. Any method that can be used by an instance of a class rather than by the class object.
message
+
implementation
instance method
24. When creating a class implementation file you begin with the _____ keyword and close with the @end keyword
dynamic allocation
@implementation
static typing
synchronous message
25. A ____ ____ is a situation where you free memory and then accidentally continue to use it
delegate
Signed
dangling pointer
designated
26. Objective-C borrows much of its syntax from ______ one of the earliest object-oriented languages
NSString
event
Smalltalk
doubles
27. A prototype for a particular kind of object; declares instance variables and defines methods for all members of the class.
designated
implementation
class
init
28. Instance variables are optional in iOS if ________ are used
Enumerations
delegates
properties
NSObject
29. The _____ function can be used to print a message to the console
remote object
mutex
printf( )
outlet
30. In the Objective-C language the declaration of a group of methods not associated with any particular class.
implementation
chars
protocol
instance variable
31. ______ operators take a single operand
init
Unitary
zero
superset
32. If you are compiling an application with ARC (Automatic reference Counting) you _______ store Objective-C objects inside a struct
asterisk (*)
cannot
null
comma-separated
33. A _______ method is one that is likely to be unsupported in the future. It's use should be discontinued.
%@
outlet
factory object
deprecated
34. The most flexible C data type: ______
pointer
@implementation
struct
Protocols
35. There are ____ fundamental building blocks in Objective-C
dynamic binding
[receiver message];
remote object
9
36. 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.
pointer
class method
AppKit
class object
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.
Smalltalk
instance
floating-point
printf( )
38. An object that acts on behalf of another object.
instance
fields
selector
delegate
39. Pointers are declared by placing a(n) ___ between the type declaration and the variable name
strong
Unitary
%
asterisk (*)
40. 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.
designated initializer
chars
formal protocol
instance
41. Objective-C objects should use strong or weak ______
Edit>Refactor>Convert to Objective-C ARC
procedural programming language
attributes
runtime
42. A way to package a logically related set of classes & protocols and functions together with localized strings & online documentation and other pertinent files.
instance method
framework
readonly
Unitary
43. A compiler feature that provides automated memory management
unitary
heap
inheritance hierarchy
ARC
44. A class that's defined solely so that other classes can inherit from it. Programs don't use instances of this; they use only instances of its subclasses.
long long
synchronous message
abstract class
Pointers
45. A message sent from one application to an object in another application.
Enumerations
remote message
Edit>Refactor>Convert to Objective-C ARC
precedence
46. Three main categories of more complicated data structures:_______ - arrays and structs
pointers
cycles
AppKit
chars
47. A variable that points to the memory address of another value
delegates
null
namespace
pointer
48. Property attribute that synthesizes only a getter for the property
%@
Smalltalk
readonly
delegates
49. A class is said to do this when it declares that it implements all the methods in the protocol.
adopt
%@
unitary
framework
50. A ____ _____ is where you forget to free up memory
ARC
memory leak
Pointers
anonymous object