100 TOP Real Time Objective C Multiple Choice Questions and Answers PDF Download
100 TOP Real Time Objective C Multiple Choice Questions and Answers PDF Download
How do you get the Unicode character set of a Core Text font?
A. CTFontCopyDisplayName
B. CTFontCopyCharacterSet
C. CTFontCopyFamilyName
Ans: B
How can you declare a method, that can be set as the action to be
performed on various events?
A. (IBAction) action:(id) sender;
B. -(SEL) action:(id) event;
C. -(selector) action:(id) sender;
Ans: A
What is KVO?
A. Key Variable Obfuscation
B. Key Value Operations
C. Key Value Observing
Ans: C
What is a Category?
A. A category is a way to extend a class by adding functions to it
B. A category is adding methods to a class where pointers in the
memory no longer exist for an instance of a class to execute it.
C. A category defines a set of functions which a class implements
D. One way to alter the destination of a message at runtime by
switching the implementations.
Ans: A
If you define a new class called Foo which inherits from NSObject,
how do you create a new instance of it?
A. Foo *temp = new Foo();
B. Foo *temp = Make Instance of Foo;
C. Foo *temp = [[Foo alloc] init];
D. Foo *temp = System.Create(Foo);
E. Foo *temp = [Foo init];
Ans: C
ARC means?
A. Automatic Reference Counting
B. Angular Reference Courting
C. Access Reference Collation
D. Artificial Reference Counting
E. Application Reference Collection
Ans: A
What is a delegate?
A. A delegate is a UIView
B. A delegate holds the type of data a variable stores
C. A delegate allows one NSObject to send messages to another
NSObject, and listen to those messages
D. A delegate is a variable
Ans: C
What is the name of the type of SQL Database that iOS Supports?
A. SQL
B. NoSql
C. SQLite
D. MySql
Ans: C
What type of object is this under XCode 4.5: @[rabbit, chicken, owl]
A. SQLite schema
B. NSArray
C. NSString
D. NSDictionary
Ans: B
True or False? A method and a variable can have the same name in
Objective-C.
A. False
B. True
Ans: B
How can you add a new method foo to an existing class Bar?
A. Both “extend” options are correct.
B. It’s not possible.
C. Send Bar the “extend:” message, e.g. [Bar extend: foo].
D. Define a C function foo and then send Bar the
extend:withSelector: message, e.g. [Bar extend: foo withSelector:
@selector(foo:)].
E. Make a category, e.g. @interface Bar(Foo).
Ans: E
Can you call C++ code from objective C environment?
A. Yes, from any .mm file
B. Yes, from any .m file
C. No, it is not possible
Ans: A
What is the difference between [Foo new] and [[Foo alloc] init]?
A. New will not always initialize the object.
B. New is significantly faster than alloc + init.
C. None, they perform the same actions.
D. New does not exist in Objective-C.
Ans: C
What class will allow you to use one or more blocks concurrently?
A. NSBlockOperation
B. NSConcurrentBlock
C. NSConcurrency
D. NSBlock
Ans: A
In Core Data, what is the name of the object representation for the
database schema?
A. NSManageObjectContext
B. NSManagedObjectModel
C. NSEntityDescription
D. NSManagedObject
Ans: B
Which framework lets you determine the current location or
heading associated with a device?
A. CFLocation
B. MapKit
C. LocationKit
D. CoreLocation
E. NSLocation
Ans: D
What is (void*)0 ?
A. Representation of void pointer
B. None of above
C. Representation of NULL pointer
D. Error
Ans: C
What does the following code do, assume ARC is enabled? NSArray
*myArray; for (int i = 0; i < 10; i++){ @autoreleasepool { myArray =
[[NSArray alloc]init]; } }
A. For each iteration of the loop a new array is allocated and
released.
B. For each iteration of the loop a new array is allocated and will be
released at the end of the loop.
C. For each iteration of the loop a new array is allocated only.
D. For each iteration of the loop a new array is allocated and will
leak memory.
Ans: A
What happens if you use fgets and do not give it a size smaller than
the buffer?
A. It will use the size of the object as its size
B. It will overwrite the data past the size
C. It will clip its size automatically
D. None of these
Ans: B
how can we return multiple values from function?
A. not possible
B. void*
C. tuple
Ans: C
If you wanted to override the default alloc method in a class Foo,
what would be the appropriate way to declare it?
A. (Foo *) alloc;
B. + (Foo *) alloc;
C. + (id) alloc;
D. It’s not possible to override alloc.
E. (id) alloc;
Ans: C
What is not supported in Objective-C
A. Recursive method call
B. Method argument default value
C. Variable argument count to method
D. Byte manipulation
Ans: B
What class method is used to make an NSArray from NSData
class?
A. NSArray arrayWithObject:
B. NSFileManager defaultManager
C. NSData dataWithContentsOfFile:
D. NSKeyedUnarchiver unarchiveObjectWithData:
Ans: D
What do you use for an outgoing TCP connection?
A. NSStream
B. NSTCPProtocol
C. (none of these)
D. NSUrlStream
Ans: A
Which method, if defined, is guaranteed to be called once — and
only once — when a class is first referenced?
A. + (id) alloc;
B. + (void) init;
C. + (id) init;
D. + (Class) alloc;
E. + (void) initialize;
Ans: E
Which of these property declaration attributes does not specify
setter semantics?
A. strong
B. assign
C. nonatomic
D. weak
E. copy
Ans: C
What can you say about the code: NSString * str = [NSString
stringWithFormat:@””]; [str release];
A. it will cause a SIGABRT when the enclosing method ends
B. It will cause the string to be released twice with undefined
consequences when the surrounding autorelease pool is emptied
C. It will cause a SIGSEGV at [str release];
D. None of these
E. It is correct, everything will work fine
Ans: B
How do you add a brightening effect on a CoreImage?
A. Set the alpha
B. CIBrighten
C. CIAdditionCompositing
Ans: C
Which of these methods is NOT invoked by the runtime itself?
A. -forwardInvocation:
B. +load
C. +initialize
D. -dealloc
E. -doesNotRecognizeSelector:
Ans: D
What is the last chance for an object to handle a message?
A. -forwardInvocation:
B. -forwardingTargetForSelector:
C. -respondsToSelector:
D. +resolveInstanceMethod:
E. +instancesRespondToSelector:
Ans: A
← 99 TOP Real Time Magento 99 TOP Real Time OpenGL Multiple
Multiple choice Questions and choice Questions and Answers pdf
Answers pdf download download →
LEAVE A REPLY
Your email address will not be published. Required fields are marked *
Comment
Name *
Email *
Website
Save my name, email, and website in this browser for the next time I
comment.
Post Comment
Copyright 2020 , Read TOP Online Interview Questions and Answers , Theme by Discount Promo Codes