The following Objective C MCQs have been compiled by our experts through research, in order to test your knowledge of the subject of Objective C. We encourage you to answer these multiple-choice questions to assess your proficiency.
Please continue by scrolling down.
A. False
B. True
A. A dependency is a way to have an operation wait to be performed until the dependencies have been fulfilled/executed
B. A dependency sets the variables of the NSOperationQueue
C. A dependency is the alloc/init method of the NSOperationQueue
A. Allows you to view your variable values
B. A debugging tool that frees up memory
C. Recording information from a single process about memory allocation
A. Key Value Operations
B. Key Variable Obfuscation
C. Key Value Observing
A. + methods are public, - methods are private
B. Instance methods begin with - class level methods begin with +
C. + methods are inheritable, - methods are not
A. FALSE
B. TRUE
A. It is released from memory
B. It is permanently stored in memory
C. You increase its retain count by 1
D. It will stay in memory until the app closes
A. - (IBAction) action:(id) sender;
B. -(SEL) action:(id) event;
C. -(selector) action:(id) sender;
A. It defines the properties and direction of emitted particles from a CAEmitterLayer object.
B. Nothing, it is not a valid class
C. It is used by the GPS to track user coordinates and returns to values as coordinates
D. It intercepts touch events
A. free(obj)
B. None of the above
C. [obj free]
D. [obj release]
E. [obj dealloc]
A. NSDictionary
B. NSString
C. SQLite schema
D. NSArray
A. addKVO:forKey:
B. addObserver:forKeyPath:options:context
C. addListener:withContext:andObject:
A. None of above
B. Interface Xcode
C. Interface Designer
D. Interface builder
E. Instruments
A. This is a type for a specific object of class id
B. This is a type for strings
C. This is the general type for any kind of object regardless of class
A. baz = [foo stringByAppendingString: bar];
B. baz = [foo concat: bar];
C. baz = foo + bar;
D. baz = [foo appendString: bar];
E. baz = foo & bar;
A. [NSArray array]
B. [NSFileManager defaultManager]
A. CoreGraphics
B. Foundation
C. OpenGLES
D. EventKit
E. UIKit
A. Foo *temp = new Foo();
B. Foo *temp = [[Foo alloc] init];
C. Foo *temp = System.Create(Foo);
D. Foo *temp = [Foo init];
E. Foo *temp = Make Instance of Foo;
A. "foo"
B. NSString("foo")
C. $"foo"
D. @"foo"
E. #"foo"
A. Artificial Reference Counting
B. Application Reference Collection
C. Access Reference Collation
D. Angular Reference Courting
E. Automatic Reference Counting
A. A delegate holds the type of data a variable stores
B. A delegate allows one NSObject to send messages to another NSObject, and listen to those messages
C. A delegate is a UIView
D. A delegate is a variable
A. In a button
B. On a cell
C. On a Map View
D. On a table view
A. float
B. int
C. NSNumber
D. double
A. SQLite
B. SQL
C. NoSql
D. MySql
A. CTFontCopyCharacterSet
B. CTFontCopyFamilyName
C. CTFontCopyDisplayName
A. NSCoreDataSort
B. NSSortDescriptor
C. NSSort
D. [self sort]
A. False
B. True
A. NSLocation
B. CFLocation
C. CoreLocation
D. MapKit
E. LocationKit
A. Define a C function foo and then send Bar the extend:withSelector: message, e.g. [Bar extend: foo withSelector: @selector(foo:)].
B. Both "extend" options are correct.
C. Make a category, e.g. @interface Bar(Foo).
D. It's not possible.
E. Send Bar the "extend:" message, e.g. [Bar extend: foo].
A. Implement all methods in the protocol without exception
B. Implement all methods in the protocol, except for optional ones
C. Implement all methods which do not have a default implementation in the protocol
D. Implement all or some methods and leave the rest to be implemented by subclasses
A. A template for a solution to a common problem faced by programmers.
B. A methodology for approching database design.
C. Coding standards used by an organization.
A. False
B. True
A. Every viewcontroller can handle the loading and unloading of other viewcontroller.
B. The root viewcontroller handles loading and unloading its child viewcontrollers.
A. UIKit
B. CoreData
C. Foundation
A. b-var;
B. b.var;
C. b>var;
D. b->var;
E. b
A. true
B. false
A. Yes
B. No
A. gets SIGABRT while executing the application
B. none of the above
C. An Error during compile
D. it put the value Hello World into a string named myString
E. makes the pointer to myString equal to the pointer of the new created object with @"hello world"
A. False
B. True
A. It depends on the object
B. No, you use init and dealloc on Objective-C
C. Yes
D. Only NSStrings do
A. None, that is not a valid Objective-C expression.
B. SEL
C. selector
D. id
A. NSConcurrentBlock
B. NSBlock
C. NSBlockOperation
D. NSConcurrency
A. The @dynamic directive generates setter method for your property at compile time.
B. The @dynamic directive generates getter method for your property at compile time.
C. The @dynamic directive generates the accessor methods for you at compile time.
D. The @dynamic directive tells the compiler that you will provide accessor methods dynamically at runtime.
A. Integers are only partial objects in Objective-C (e.g. do not support any user defined methods).
B. No, they are not objects at all.
C. Yes.
D. Yes, but only if you first cast them as id's, e.g. (id) 123.
A. NSArray *array = @{@"One", @"Two", @"Three"};
B. NSArray *array = @[@"One", @"Two", @"Three"];
C. NSArray *array = [@"One", @"Two",@"Three"];
D. NSArray *array = {@"One", @"Two",@"Three"};
A. object2 is instantiated as an NSObject with nil values
B. Log prints "(null)" and continues as usual.
C. Application crashes with "SIGABRT: object has been derferenced" error
D. Application continues, but issues "cannot access nil object reference" warning
A. A CAEmitterCell
B. A UIEmitterView
C. A NSEmitter
A. NSManagedObject
B. NSManageObjectContext
C. NSManagedObjectModel
D. NSEntityDescription
A. No return type
B. id
C. *NSString
A. po
B. print
C. -l
D. p