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. Square bracket syntax for calling a method
anonymous object
floating-point
fields
[receiver message];
2. In object-oriented programming the ability of a superclass to pass its characteristics (methods and instance variables) on to its subclasses.
Unsigned
inheritance
interface
Smalltalk
3. Property attribute that synthesizes only a getter for the property
runtime
readonly
inheritance
%@
4. Two additional foundational building blocks of Objective-C distinct from data and procedure type foundations: ________ and Categories/Extensions
dereference (dereferencing)
class method
readwrite
Protocols
5. Initializer method traditionally begin with the _____ prefix
binary
zero
init
distributed objects
6. Property attribute where the setter stores the assigned value but does not perform any memory management.
designated initializer
assign
remote object
namespace
7. To destroy an object set the variable that points to it to _____
Categories
@implementation
nil
weak
8. The part of an Objective-C class specification that declares its public interface which includes its superclass name & instances variables and public-method prototypes.
structures
interface
AppKit
Pointers
9. 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.
Signed
delegates
inheritance hierarchy
message
10. A class that's one step above another class in the inheritance hierarchy; the class through which a subclass inherits methods and instance variables.
Encapsulation
square brackets
Edit>Refactor>Convert to Objective-C ARC
superclass
11. The _____ function can be used to print a message to the console
binary
cannot
printf( )
method
12. Procedures (like verbs) are processes that manipulate or transform data and in Objective-C these 3 elements are _____ - functions and methods
Interface Builder
dereference (dereferencing)
C operators
dynamic allocation
13. ______ data types are always zero or greate
dynamic binding
chars
Unsigned
interface
14. _____ allow you to add new methods to existing classes
Categories
static typing
instance
attributes
15. Protocols are adopted by adding a ____________ list of protocols inside angled brackets after the superclass declaration in a class's @interface block
comma-separated
nil
dynamic binding
conform
16. Objective-C objects should use strong or weak ______
class object
Unsigned
Signed
attributes
17. The process of setting or reading the value at an address pointed to by a pointer
heap
chars
polymorphism
dereference (dereferencing)
18. A ____ ____ is a situation where you free memory and then accidentally continue to use it
dangling pointer
properties
conform
cannot
19. 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
Encapsulation
pointers
interface
20. A variable that points to the memory address of another value
pointer
procedures
implementation
%
21. _____ is one of the main advantages of object-oriented code and allows objects to 'hide away' much of their complexity operating at times like a proverbial 'black-box'.
factory object
Encapsulation
square brackets
9
22. C-style strings are stored in an array of _____
remote message
chars
protocol
comma-separated
23. 7 Common Integer data types: BOOL - char- short - int - long - _____ - NSInteger
dynamic typing
long long
Categories
id
24. 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.
outlet
abstract class
nonatomic
designated
25. A compiler feature that provides automated memory management
ARC
C operators
NSObject
instance
26. In object-oriented programming the ability of different objects to respond each in its own way - to the same message.
message
C operators
Enumerations
polymorphism
27. The 6 main categories of operators are: ____ - arithmetic - comparison - logical - bitwise and membership
remote object
Cocoa
pointer
assignment
28. A message sent from one application to an object in another application.
readonly
remote message
asterisk (*)
9
29. The first index in an array is valued at ____
static typing
polymorphism
null
zero
30. A class is said to do this when it declares that it implements all the methods in the protocol.
adopt
static typing
class object
dangling pointer
31. Pointers are declared by placing a(n) ___ between the type declaration and the variable name
asterisk (*)
@implementation
protocol
delegates
32. _____ data types can be both positive and negative
ampersand (&)
Cocoa
doubles
Signed
33. A way to package a logically related set of classes & protocols and functions together with localized strings & online documentation and other pertinent files.
dereference (dereferencing)
floating-point
framework
designated
34. When creating a class header file you begin with the _____ keyword and close with the @end keyword
abstract superclass
superclass
@interface
event
35. All objects are created on the _____
NSObject
chars
heap
Unsigned
36. A struct may contain multiple ____ consisting of different data types
instance
fields
abstract class
readonly
37. ARC is susceptible to retain _____
Signed
cycles
NSObject
class
38. A prototype for a particular kind of object; declares instance variables and defines methods for all members of the class.
class
framework
instance
Protocols
39. Xcode sequence to convert non-ARC apps to ARC
Edit>Refactor>Convert to Objective-C ARC
factory
delegates
conform
40. Instance variables are optional in iOS if ________ are used
implementation
instance
properties
nil
41. 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.
nil
assignment
instance
doubles
42. The most flexible C data type: ______
message expression
Enumerations
struct
strong
43. A ____ _____ is where you forget to free up memory
memory leak
message expression
abstract superclass
delegates
44. A protocol declared as a category usually as a category of the NSObject class.
static typing
Product>Profile>Leaks>Profile
delegates
informal protocol
45. _____ allow indirect access and modification of a variable's value.
readwrite
formal protocol
Pointers
event
46. Property attribute that causes the setter to store a strong reference to the assigned value
long long
abstract superclass
strong
runtime
47. Any method that can be used by an instance of a class rather than by the class object.
instance method
AppKit
method
readonly
48. When creating a class implementation file you begin with the _____ keyword and close with the @end keyword
@implementation
readonly
polymorphism
superclass
49. In the Objective-C language the declaration of a group of methods not associated with any particular class.
polymorphism
protocol
mutex
copy
50. 3 Common Float data types: float - _____ - CGFloat
zero
null
interface
double