MCQs > IT & Programming > Objective C MCQs > Basic Objective C MCQs

Basic Objective C MCQ

1. What is wrong with this line of code? int temp = 1==1;

Answer

Correct Answer: Nothing is wrong with it.

Note: This Question is unanswered, help us to find answer for this one

2. You are worried about threaded access to a property and possible collision in writing. What directive should you use on the property?

Answer

Correct Answer: Atomic

Note: This Question is unanswered, help us to find answer for this one

3. What is significant about this function declaration? -(void)testFunc:(NSString**)str;

Answer

Correct Answer: The parameter is passed by reference and may be changed

Note: This Question is unanswered, help us to find answer for this one

4. Dot notation can be used for _?

Answer

Correct Answer: Property getter/setter

Note: This Question is unanswered, help us to find answer for this one

5. What's the difference between an array and a set?

Answer

Correct Answer: Arrays are ordered, non-unique values.

Note: This Question is unanswered, help us to find answer for this one

6. What is this a declaration of? int(^foo)(int);

Answer

Correct Answer: A block of code

Note: This Question is unanswered, help us to find answer for this one

7. What are categories used for?

Answer

Correct Answer: To extend other classes

Note: This Question is unanswered, help us to find answer for this one

8. If you want to store a small amount of information (e.g., user settings), whats the best, built-in way to go?

Answer

Correct Answer: UserDefaults

Note: This Question is unanswered, help us to find answer for this one

9. What is an enums base type for the code below? typedef enum { Foo1, Foo2} Foo;

Answer

Correct Answer: There is no base type.

Note: This Question is unanswered, help us to find answer for this one

10. Structs can have _?

Answer

Correct Answer: Fields

Note: This Question is unanswered, help us to find answer for this one

11. What is different about this function? +(void)doSomething;

Answer

Correct Answer: It is static

Note: This Question is unanswered, help us to find answer for this one

12. What best describes class inheritance in Objective-C?

Answer

Correct Answer: Single inheritance but multiple protocol implementation

Note: This Question is unanswered, help us to find answer for this one

13. What does ARC stand for?

Answer

Correct Answer: Automatic Reference Counting

Note: This Question is unanswered, help us to find answer for this one

14. What's wrong with this code?float x = 5.;

Answer

Correct Answer: Nothing is wrong with this code.

Note: This Question is unanswered, help us to find answer for this one

15. What is foo? -(float)foo;

Answer

Correct Answer: A function with a return type of float.

Note: This Question is unanswered, help us to find answer for this one

16. What is the key difference between NSDictionary and NSMutableDictionary?

Answer

Correct Answer: NSMutableDictionary's values can change

Note: This Question is unanswered, help us to find answer for this one

17. Property defaults include _?

Answer

Correct Answer: Atomic/strong

Note: This Question is unanswered, help us to find answer for this one

18. For permanent storage of some data Apple provides:

Answer

Correct Answer: CoreData framework

Note: This Question is unanswered, help us to find answer for this one

19. To display some web page, Apple provides a predefined class called:

Answer

Correct Answer: UIWebView

Note: This Question is unanswered, help us to find answer for this one

20.

What will be printed on screen after running the following code?

int main()

{
    int a = 5;
    float c = .5f
    printf("%.2f", a / c);
    return 0;
}

Answer

Correct Answer: Nothing: you will get a compile-time error


10.0


Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

21. What’s the hierarchy of UITextView class until NSObject?

Answer

Correct Answer: UITextView >> UIScrollView >> UIView >> UIResponder >> NSObject

Note: This Question is unanswered, help us to find answer for this one

22. Which of the following is a valid property name of the NSException class?

Answer

Correct Answer: “userInfo”

Note: This Question is unanswered, help us to find answer for this one

23. If you need to raise a new exception, you will use:

Answer

Correct Answer: “@throw” statement

Note: This Question is unanswered, help us to find answer for this one

24. Which of these classes are collections?

Answer

Correct Answer: None of the above

Note: This Question is unanswered, help us to find answer for this one

25. To create an animation, which starts slowly, but then accelerates as it progresses, you will use:

Answer

Correct Answer: UIViewAnimationOptionCurveEaseIn

Note: This Question is unanswered, help us to find answer for this one

26. Which of the following is a valid generics type definition?

Answer

Correct Answer: NSMutableArray dogs = [NSMutableArray new];

Note: This Question is unanswered, help us to find answer for this one

27. Which of the following is a valid attribute for a property declared in protocol?

Answer

Correct Answer: nonatomic

Note: This Question is unanswered, help us to find answer for this one

28. Which of the following is true?

Answer

Correct Answer: Calling “alloc” increases the references count by +1

Note: This Question is unanswered, help us to find answer for this one

29. Which of the following is a valid property name of the NSError class?

Answer

Correct Answer: “domain”

Note: This Question is unanswered, help us to find answer for this one

30. Which of the following is an animatable property of a CALayer object?

Answer

Correct Answer: opacity

Note: This Question is unanswered, help us to find answer for this one

31. A proper implementation of “dealloc” method in your custom class must include:

Answer

Correct Answer: Releasing ownership on all of the owned properties and calling “[super dealloc];”

Note: This Question is unanswered, help us to find answer for this one

32. Which statement contains a valid code for adding a method, which is not necessary to implement within a class which will conform to the protocol?

Answer

Correct Answer: @optional -(NSString)someMethod;

Note: This Question is unanswered, help us to find answer for this one

33. Which is a correct statement for declaring a new category for UIColor class?

Answer

Correct Answer: @interface UIColor (MyCategory)

Note: This Question is unanswered, help us to find answer for this one

34. When deleting a CoreData NSManagedObject, you can specify to also delete its properties from the database, by setting a rule called:

Answer

Correct Answer: “Cascade”

Note: This Question is unanswered, help us to find answer for this one

35. Right after an exception occurs, your program executes the code from the:

Answer

Correct Answer: “@catch” block

Note: This Question is unanswered, help us to find answer for this one

36. Which statement about protocols is true?

Answer

Correct Answer: There is no way to define a class function in protocol

Note: This Question is unanswered, help us to find answer for this one

37. Which of the following is NOT a predefined exception class name?

Answer

Correct Answer: NSGeneticException

Note: This Question is unanswered, help us to find answer for this one

38. If there was no “@catch” block specified for handling exceptions, what will happen then?

Answer

Correct Answer: compile-time error

Note: This Question is unanswered, help us to find answer for this one

39. Which is a correct statement to declare a new protocol?

Answer

Correct Answer: None of the above

Note: This Question is unanswered, help us to find answer for this one

40. What is the correct code to include C “Header.h” header in Objective-C “.m” source file?

Answer

Correct Answer: #import “Header.h”

Note: This Question is unanswered, help us to find answer for this one

41. Which of the following is a correct name of memory management method?

Answer

Correct Answer: Automatic Reference Counting

Note: This Question is unanswered, help us to find answer for this one

42. Which of the following are valid property annotations?

Answer

Correct Answer: None of the above

Note: This Question is unanswered, help us to find answer for this one

43. Which of the following is true?

Answer

Correct Answer: “assign” property attribute stores a direct pointer without any “retain” / “release” calls

Note: This Question is unanswered, help us to find answer for this one

44. If a is an integer, the expression !a (...)?

Answer

Correct Answer: All of the above

Note: This Question is unanswered, help us to find answer for this one

45. As categories can't have instance variables, what class could you use to implement a full class only with categories

Answer

Correct Answer: NSMutableDictionary
dealloc

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

46.

Using object-oriented programming the object that sends a message

Answer

Correct Answer: id

Note: This Question is unanswered, help us to find answer for this one

47.

All of the methods in a (...) annotated with @required must be implemented. 

Answer

Correct Answer: protocol

Note: This Question is unanswered, help us to find answer for this one

48.

When an object's retainCount reaches 0, which message is automatically sent to that Object?

Answer

Correct Answer: dealloc

Note: This Question is unanswered, help us to find answer for this one

49.

Considering the following Objective-c snippet, which of the following is NOT correct ?

#import <Foundation/Foundation.h> @interface SampleClass:NSObject - (void)sampleMethod; @end @implementation SampleClass - (void)sampleMethod{ NSLog(@"Hello, World! \n"); } @end int main() { /* my first program in Objective-C */ SampleClass *sampleClass = [[SampleClass alloc]init]; [sampleClass sampleMethod]; return 0; }

Answer

Correct Answer: `@end` marks the end of the class

Note: This Question is unanswered, help us to find answer for this one

50.

Considering the following Objective-C code, which of the following statements is correct ?

// function declaration intfunc(); int main() { // function call inti = func(); } // function definition intfunc() { return 0; }

Answer

Correct Answer: The code won't run because the `func()` was not defined at the time of the call.

Note: This Question is unanswered, help us to find answer for this one

51.

Which of the following is a correct sample of block implementation in Objective-C?

Answer

Correct Answer: `void (^simpleBlock)(void) = ^{NSLog(@"This is a block");};`

Note: This Question is unanswered, help us to find answer for this one

52.

It's possible to add a (...) to the standard NSString class, for example, to extend its functionality.

Answer

Correct Answer: category

Note: This Question is unanswered, help us to find answer for this one

53.

Which of the following is NOT correct to state about Objective-C language ?

Answer

Correct Answer: It's an interpreted programming language designed for object orientation

Note: This Question is unanswered, help us to find answer for this one

54.

In Objective-C, if I call performSelector:withObject:afterDelay: – is the object retained ?

Answer

Correct Answer: No

Note: This Question is unanswered, help us to find answer for this one

55.

Considering best practices of memory management in Objective-C, is it correct to say that the delegate is never retained ?

Answer

Correct Answer: Yes

Note: This Question is unanswered, help us to find answer for this one

56.

#import <Foundation/Foundation.h>int main() { inti = 17; char c = 'c'; /* ascii value is 99 */ int sum; sum = i + c; NSLog(@"sum : %d\n", sum ); return 0; }

When the above code is compiled and executed, it produces the following result:

Answer

Correct Answer: sum : 116

Note: This Question is unanswered, help us to find answer for this one

57.

The following Objective-C code defines

... @interface Fraction (MathOps) ... @end

Answer

Correct Answer: a category called MathOps

Note: This Question is unanswered, help us to find answer for this one

58.

In which of the following situations you would NOT use void types?

Answer

Correct Answer: To define functions which do not return value

Note: This Question is unanswered, help us to find answer for this one

59.

Which of the following is NOT correct about Protocols ?

Answer

Correct Answer: A single class cannot conform to multiple protocols.

Note: This Question is unanswered, help us to find answer for this one

60.

The Objective-C code ... @interface MyClass : NSObject<Sample> ... @end

Answer

Correct Answer: Indicates MyClass conforms to the Sample protocol

Note: This Question is unanswered, help us to find answer for this one

61.

Considering the following Objective-C code, what will get printed:

#import <Foundation/Foundation.h>int main()

{ int sum = 17, count = 5; CGFloat mean; mean = (CGFloat) sum / count; NSLog(@"mean : %f", mean ); return 0; }

Answer

Correct Answer: mean : 3.400000

Note: This Question is unanswered, help us to find answer for this one

62.

Consider below declaration of Song object and tell proper way to call name property?

import @interface Song:NSObject { NSString *name; NSString *artist; } (NSString *) name; (NSString *) artist; @ end

Answer

Correct Answer: mySong->name;
[mySong, name];

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

63.

What is the best way to convert NSNumber into NSString?

Answer

Correct Answer: NSString *string = [NSNumberstringValue];

Note: This Question is unanswered, help us to find answer for this one

64.

Name a property attribute that synthesizes accessors that are not thread safe?

Answer

Correct Answer: nonatomic

Note: This Question is unanswered, help us to find answer for this one

65.

Where does Objective C store objects, Heap or stack?

Answer

Correct Answer: Heap

Note: This Question is unanswered, help us to find answer for this one

66.

Look at below code and tell correct output?

import static int count; intcnt; for (inti = 0; i<100; i++) { count++; cnt++; } NSLog(@"count=%d cnt=%d\n", count, cnt);

Answer

Correct Answer: count=100 cnt=100

Note: This Question is unanswered, help us to find answer for this one

67.

What is a local variable that has no default initial value and does not retain its value through method calls?

Answer

Correct Answer: A static variable

Note: This Question is unanswered, help us to find answer for this one

68.

Can you call C++ code from the Objective-C environment?

Answer

Correct Answer: Yes, from any .mm file

Note: This Question is unanswered, help us to find answer for this one

69.

Which of the following is a Singleton?

Answer

Correct Answer: [NSFileManager* objects]

Note: This Question is unanswered, help us to find answer for this one

70.

Look at below code and provide the reference counter value after it executes:

Object *anObj = [[Object alloc] init]; [anObj retain];     [anObj release]; [anObj release];

Answer

Correct Answer: Reference counter will be 0, anObj will be deallocated automatically

Note: This Question is unanswered, help us to find answer for this one

71.

What will be the output of following code?

BOOL isBool = YES; NSLog(@"%d", isBool);

Answer

Correct Answer: 1

Note: This Question is unanswered, help us to find answer for this one

72.

Please pick the most suitable difference between alloc and dealloc?

Answer

Correct Answer: alloc creates a new instance and make the reference counter as 1, dealloc will remove the instance automatically when its reference counter become 0

Note: This Question is unanswered, help us to find answer for this one

73.

An object id with a value of 0?

Answer

Correct Answer: nil

Note: This Question is unanswered, help us to find answer for this one

74.

How do you search an object in an object array?

Answer

Correct Answer: NSEnumerator *enumerator = [array objectEnumerator]; while([enumerator nextObject]){…}

Note: This Question is unanswered, help us to find answer for this one

75.

Property attribute that synthesizes only a getter for the property?

Answer

Correct Answer: readonly

Note: This Question is unanswered, help us to find answer for this one

76.

Which is the most proper answer to load plist file contents into an array?

Answer

Correct Answer: NSArray * array = [[NSArrayalloc] initWithContentsOfFile:plistfile_path];

Note: This Question is unanswered, help us to find answer for this one

77.

Which of the following contain an INCORRECT way to declare and initialize an array ?

Answer

Correct Answer: `double balance = {1000.0, 2.0, 3.4, 17.0, 50.0}; `

Note: This Question is unanswered, help us to find answer for this one

78.

In Objective-C, sometime, you may find that you wish to extend an existing class by adding behavior that is useful only in certain situations. In order to add such extension to existing classes, Objective-C provides ...

Answer

Correct Answer: categories and extensions

Note: This Question is unanswered, help us to find answer for this one

79.

The (...) is an Objective-C directive, which is also used to define the aliases for various data types similar to (...). But (...) is limited to giving symbolic names to types only, whereas (...) can be used to define alias for values as well, like you can define 1 as ONE, etc.

Answer

Correct Answer: #define, typedef, typedef, #define

Note: This Question is unanswered, help us to find answer for this one

80.

Which of the following contain an INCORRECT concept regarding Objective-C programming ?

Answer

Correct Answer: None of the above

Note: This Question is unanswered, help us to find answer for this one

81.

Memory management is one of the most important processes in any programming language. It is the process by which the memory of objects are allocated when they are required and deallocated when they are no longer required. Objective-C Memory management techniques can be broadly classified into two types: "Manual Retain-Release" or MRR and "Automatic Reference Counting" or ARC. Which of the following is NOT correct regarding memory management in Objective-C ?

Answer

Correct Answer: In MRR, when we no longer need an object, we must relinquish the ownership by sending it a release message; the autorelease message tough can only be sent in ARC contexts.

Note: This Question is unanswered, help us to find answer for this one

82.

Memory management is one of the most important processes in any programming language. It is the process by which the memory of objects are allocated when they are required and deallocated when they are no longer required. In (...), when we no longer need it, we must relinquish ownership of an object we own: We relinquish ownership of an object by sending it a release message or an autorelease message. In Cocoa terminology, relinquishing ownership of an object is therefore typically referred to as "releasing" an object.

Answer

Correct Answer: ARC

Note: This Question is unanswered, help us to find answer for this one

83.

In Objective-C, retain counts are the way in which memory is managed. When you create an object, it has a retain count of (...). When you send an object a retain message, its retain count is incremented by (...). When you send an object a release message, its retain count is decremented by (...). When you send an object a autorelease message, its retain count is decremented by (...) at some stage in the future. If an objectʼs retain count is reduced to (...), it is deallocated.

Answer

Correct Answer: 1, 1, 1, 1, 0

Note: This Question is unanswered, help us to find answer for this one

84.

Objective-C allows you to define protocols, which declare the methods expected to be used for a particular situation. Protocols are implemented in the classes conforming to the protocol. The methods under keyword (...) must be implemented in the classes that conform to the protocol and the methods under (...) keyword are optional to implement.

 

Answer

Correct Answer: @required, @optional

Note: This Question is unanswered, help us to find answer for this one

85.

In the real world, people on official business are often required to follow strict procedures when dealing with certain situations. In the world of object-oriented programming, it’s important to be able to define a set of behaviors that is expected of an object in a given situation. As an example, a table view expects to be able to communicate with a data source object in order to find out what it is required to display. This means that the data source must respond to a specific set of messages that the table view might send. The data source could be an instance of any class, such as a view controller or a dedicated data source class that perhaps just inherits from NSObject. In order for the table view to know whether an object is suitable as a data source, it’s important to be able to declare that the object implements the necessary methods. The description above is essentially related to which feature of Objective-C programming language ?

Answer

Correct Answer: Protocols

Note: This Question is unanswered, help us to find answer for this one

86.

Which of the following is the base class of all objects in Objective-c ?

Answer

Correct Answer: NSObject

Note: This Question is unanswered, help us to find answer for this one

87.

Objective-C provides a range of methods to work with NSNumber. Which of the following methods creates and returns an NSNumber object containing a given value, treating it as an NSInteger.

Answer

Correct Answer: `+ (NSNumber *)numberWithInteger:(NSInteger)value `

Note: This Question is unanswered, help us to find answer for this one

88.

While calling a function by reference, it will copy the actual value of an argument into the formal parameter of the function. In this case, changes made to the parameter inside the function have no effect on the argument. Is the statement above True ?

Answer

Correct Answer: No

Note: This Question is unanswered, help us to find answer for this one

89.

Objective-C is a general-purpose, object-oriented programming language that adds Smalltalk-style messaging to the (...) programming language. This is the main programming language used by Apple for the OS X and iOS operating systems and their respective APIs, Cocoa and Cocoa Touch.

Answer

Correct Answer: C

Note: This Question is unanswered, help us to find answer for this one

90.

What happens when the following code executes?

Ball *ball = [[[[Ball alloc] init] autorelease] autorelease];

Answer

Correct Answer: It will crash

Note: This Question is unanswered, help us to find answer for this one

91.

Which of the following is correct (legal) floating-point literal ?

Answer

Correct Answer: 314159E-5L

Note: This Question is unanswered, help us to find answer for this one

92.

In Objective-C, a derived class can access all the private members of its base class if it's defined in the interface class, but it cannot access private members that are defined in the implementation file. Is the statement above correct ?

Answer

Correct Answer: Yes

Note: This Question is unanswered, help us to find answer for this one

93.

In Objective-C, retain counts are the way in which memory is managed in Objective-C. When you create an object, it has a retain count of 1. When you send an object a (...) message, its retain count is incremented by 1. When you send an object a (...) message, its retain count is decremented by 1.

Answer

Correct Answer: retain, release

Note: This Question is unanswered, help us to find answer for this one

94.

The (...) method can be used to see if an object belongs to a class that implements a particular protocol.

Answer

Correct Answer: conformsToProtocol:

Note: This Question is unanswered, help us to find answer for this one

95.

(...) is an abstractClass which represents a stream of data. They are used in Archiving and Unarchiving objects. (...) objects are usually used in a method that is being implemented so that the class conforms to the protocol.

Answer

Correct Answer: NSCoder

Note: This Question is unanswered, help us to find answer for this one

96.

In Objective-C programming, error handling is provided with (...) class available in Foundation framework. An (...) object encapsulates richer and more extensible error information than is possible using only an error code or error string. The core attributes of an (...) object are an error domain (represented by a string), a domain-specific error code and a user info dictionary containing application specific information.

Answer

Correct Answer: NSError

Note: This Question is unanswered, help us to find answer for this one

97.

Two distinct types of problems can arise while an iOS or OS X application is running. Exceptions represent programmer-level bugs like trying to access an array element that doesn’t exist. They are designed to inform the developer that an unexpected condition occurred. Since they usually result in the program crashing, exceptions should rarely occur in your production code. On the other hand, errors are user-level issues like trying load a file that doesn’t exist. Because errors are expected during the normal execution of a program, you should manually check for these kinds of conditions and inform the user when they occur. Most of the time, they should not cause your application to crash. Is the statement above correct ?

Answer

Correct Answer: Yes

Note: This Question is unanswered, help us to find answer for this one

98.

In Objective-C, Exceptions can be handled using the standard a common pattern found in most other high-level programming languages. First, you need to place any code that might result in an exception in an (...) block. Then, if an exception is thrown, the corresponding (...) block is executed to handle the problem. The (...) block is called afterwards, regardless of whether or not an exception occurred.

Answer

Correct Answer: `@try, @catch(), @finally`

Note: This Question is unanswered, help us to find answer for this one

99.

Which of the following is not a property of NSError class?

Answer

Correct Answer: reason

Note: This Question is unanswered, help us to find answer for this one

100.

In Objective-C, a category is a group of related methods for a class, and all of the methods defined in a category are available through the class as if they were defined in the main interface file. Instead of the normal @interface declaration, we include the category name in (...) after the class name we're extending.

Answer

Correct Answer: `()`

Note: This Question is unanswered, help us to find answer for this one

101.

If you start a class definition that conforms to a specified (...), you will not need to relist all the methods you will implement for that protocol in the @interface section.

Answer

Correct Answer: protocol

Note: This Question is unanswered, help us to find answer for this one

102.

(...) are used by Cocoa and Cocoa Touch objects for a variety of different situations. For example, the table view classes (NSTableView for OS X and UITableView for iOS) both use a data source object to supply them with the necessary information. Both define their own data source (...); both table view classes also allow you to set a delegate object, which again must conform to the relevant NSTableViewDelegate or UITableViewDelegate (...). The delegate is responsible for dealing with user interactions, or customizing the display of certain entries.

Answer

Correct Answer: Protocol

Note: This Question is unanswered, help us to find answer for this one

103.

What's the hierarchy of UIButton until NSObject ?

Answer

Correct Answer: UIButton >> UIControl >> UIView >> UIResponder >> NSObject

Note: This Question is unanswered, help us to find answer for this one

104.

Which of the following contains the INCORRECT definition of a Predefined Macro ?

Answer

Correct Answer: `__STDC__`: This contains the current line number as a decimal constant.

Note: This Question is unanswered, help us to find answer for this one

105.

In (...), the system uses the same reference counting system as (...), but it inserts the appropriate memory management method calls for us at compile-time.

Answer

Correct Answer: ARC, MRR

Note: This Question is unanswered, help us to find answer for this one

106.

Which of the following contains the INCORRECT definition of a preprocessor directive ?

Answer

Correct Answer: `#error`: Issues special commands to the compiler using a standardized method

Note: This Question is unanswered, help us to find answer for this one

107.

While calling a function by reference, it will copy the address of an argument into the formal parameter. Inside the function, the address is used to access the actual argument used in the call. This means that changes made to the parameter affect the argument. Is the statement above True ?

Answer

Correct Answer: No

Note: This Question is unanswered, help us to find answer for this one

108.

Which of the following contains the INCORRECT definition of a bitwise operator ?

Answer

Correct Answer: `^`: Binary Ones Complement Operator is unary and has the effect of 'flipping' bits.

Note: This Question is unanswered, help us to find answer for this one

109.

What is category in Objective-C?

Answer

Correct Answer: Category is used to define additional methods of an existing class

Note: This Question is unanswered, help us to find answer for this one

110.

What is the difference between #import and #include?

Answer

Correct Answer: The #include allows you to include the same file many times while #import ensures that the preprocessor only includes a file once

Note: This Question is unanswered, help us to find answer for this one

111.

Where is a MKAnnotationView used?

Answer

Correct Answer: On a Map View

Note: This Question is unanswered, help us to find answer for this one

112.

Which is the most proper answer about the difference between nil and NULL?

Answer

Correct Answer: nil is an object that can receive messages but NULL is a constant

Note: This Question is unanswered, help us to find answer for this one

113.

The property attribute that causes the setter to store a strong reference to the assigned value is called:

Answer

Correct Answer: Strong

Note: This Question is unanswered, help us to find answer for this one

114.

The part of an Objective-C class specification that declares its public interface which includes its superclass name & instances variables and public-method prototypes is called:

Answer

Correct Answer: interface

Note: This Question is unanswered, help us to find answer for this one

115.

What is the difference between the unsigned int and the NSUInteger?

Answer

Correct Answer: NSUInteger is an Objective-C class

Note: This Question is unanswered, help us to find answer for this one

116.

Look at below code and tell which is correct.

(id) init { if ( self == [super init] ) { [self setCaption:@"Default Caption"]; } return self; }

Answer

Correct Answer: No problem, everything is correct

Note: This Question is unanswered, help us to find answer for this one

117.

Look at below code and tell what the problem could be:

NSNumber value1 = [[NSNumberalloc] initWithFloat:8.15]; NSNumber value2 = [NSNumber numberWithFloat:8.29]; … … … [value1 release]; [value2 release];

Answer

Correct Answer: Value1 and value2 should be initialized after allocating

Note: This Question is unanswered, help us to find answer for this one

118.

What is the name of the root class in Objective-C?

Answer

Correct Answer: NSObject

Note: This Question is unanswered, help us to find answer for this one

119.

Two additional foundational building blocks of Objective-C distinct from data and procedure type foundations: _____ and Categories/Extensions?

Answer

Correct Answer: Protocols

Note: This Question is unanswered, help us to find answer for this one

120.

What is a class object?

Answer

Correct Answer: Class Object is an implementation of a Class that has method and property

Note: This Question is unanswered, help us to find answer for this one

121.

How do you free an object?

Answer

Correct Answer: [obj release]

Note: This Question is unanswered, help us to find answer for this one

122.

What is the difference between the unsigned int and the NSUInteger?

Answer

Correct Answer: It depends on the processor

Note: This Question is unanswered, help us to find answer for this one

123.

What can you do with categories?

Answer

Correct Answer: Add methods to a class without subclassing it
Override methods of a class without subclassing it

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

124.

What can be linked to an Obj-C program without any particular process?

Answer

Correct Answer: C libraries
C++ libraries

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

125.

What is an IMP?

Answer

Correct Answer: The C type of a method implementation pointe

Note: This Question is unanswered, help us to find answer for this one

126.

Which of the following is incorrect?

Answer

Correct Answer: [AClass release]

Note: This Question is unanswered, help us to find answer for this one

127.

Protocols are like classes; they can inherit

Answer

Correct Answer: True

Note: This Question is unanswered, help us to find answer for this one

128.

Which of the following declares a protocol?

Answer

Correct Answer: @protocol ProtocolName

Note: This Question is unanswered, help us to find answer for this one

129.

How do you include the root “Object” class?

Answer

Correct Answer: It depends on the compiler

Note: This Question is unanswered, help us to find answer for this one

130.

What is a protocol?

Answer

Correct Answer: An interface without an implementation

Note: This Question is unanswered, help us to find answer for this one

131.

What can be used as Object instance variables?

Answer

Correct Answer: int
structures
pointers
unions

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

132.

What is a @finally block?

Answer

Correct Answer: A block of code that is run whenever an exception is thrown or not

Note: This Question is unanswered, help us to find answer for this one

133.

How do you throw an exception?

Answer

Correct Answer: @throw exception

Note: This Question is unanswered, help us to find answer for this one

134.

What’s the difference between copy and deepCopy?

Answer

Correct Answer: copy creates a copy at the first level, while deepcopy copies the instance variables

Note: This Question is unanswered, help us to find answer for this one

135.

Can you send messages to nil?

Answer

Correct Answer: Yes

Note: This Question is unanswered, help us to find answer for this one

136.

What is the isa variable in objects?

Answer

Correct Answer: Object class identification

Note: This Question is unanswered, help us to find answer for this one

137.

Which of the following does not happen when you throw an exception in a @synchronized block?

Answer

Correct Answer: The object is deallocated

Note: This Question is unanswered, help us to find answer for this one

138.

In which version of Objective-C did the properties system appear?

Answer

Correct Answer: 2.0

Note: This Question is unanswered, help us to find answer for this one

139.

Which of the following is not recommended?

Answer

Correct Answer: Using static variables inside methods

Note: This Question is unanswered, help us to find answer for this one

140.

Which of the following can be inherited?

Answer

Correct Answer: Categories
Protocols
Classes
Classes

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

141.

What is an autoreleased object?

Answer

Correct Answer: An object that will be released when the current AutoreleasePool is deallocated.

Note: This Question is unanswered, help us to find answer for this one

142.

Can a method be declared to accept a variable number of arguments?

Answer

Correct Answer: Yes

Note: This Question is unanswered, help us to find answer for this one

143.

What is the default visibility for instance variables?

Answer

Correct Answer: @protected

Note: This Question is unanswered, help us to find answer for this one

144.

Which of the following is false?

Answer

Correct Answer: When a method is called, the send is automatically available as the sender variable, like self or super

Note: This Question is unanswered, help us to find answer for this one

145.

What are @try and @catch?

Answer

Correct Answer: Exception keywords

Note: This Question is unanswered, help us to find answer for this one

146.

What is not supported in Obj-C?

Answer

Correct Answer: Method argument default value

Note: This Question is unanswered, help us to find answer for this one

147.

Is the following code a correct allocation?
MyClass myObj;
[&myObj aMessage];

Answer

Correct Answer: No

Note: This Question is unanswered, help us to find answer for this one

148.

What comments are supported in Obj-C?

Answer

Correct Answer: //Line comments
/* Block comments */

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

149.

What is true regarding @public?

Answer

Correct Answer: It breaks encapsulation

Note: This Question is unanswered, help us to find answer for this one

150.

What does the following imply?
Worker *ceo = [[Worker alloc] init];
ceo->boss = nil;

Answer

Correct Answer: That the ceo object is statically typed
That the boss instance variable is declared @public

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

151.

A method can be tagged to be called only by a specific class and its subclasses.

Answer

Correct Answer: False

Note: This Question is unanswered, help us to find answer for this one

152.

When using the garbage collector, which method, that is normally called without the collector, is not called on your objects where they are collected?

Answer

Correct Answer: dealloc

Note: This Question is unanswered, help us to find answer for this one

153.

How do you allocate an object?

Answer

Correct Answer: MyClass *obj = malloc(sizeof(MyClass));
MyClass *obj = malloc(sizeof(MyClass));
MyClass *obj = malloc(sizeof(MyClass));

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

154.

What is true regarding @protected?

Answer

Correct Answer: The instance variable is accessible within the class that declares it and within classes that inherit it

Note: This Question is unanswered, help us to find answer for this one

155.

What type of variable do you need to use to implement singletons?

Answer

Correct Answer: static

Note: This Question is unanswered, help us to find answer for this one

156.

Which C feature is not supported in Obj-C?

Answer

Correct Answer: Support is compiler dependant

Note: This Question is unanswered, help us to find answer for this one

157.

What is nil?

Answer

Correct Answer: The null object

Note: This Question is unanswered, help us to find answer for this one

158.

In Obj-C 2.0, what do the fast enumeration protocols rely on to provide fast Enumerations?

Answer

Correct Answer: C arrays

Note: This Question is unanswered, help us to find answer for this one

159.

What is true regarding strings?

Answer

Correct Answer: C string literals can be used in Obj-C

Note: This Question is unanswered, help us to find answer for this one

160.

In which version of Objective-C did the fast enumeration system appear?

Answer

Correct Answer: 2.0

Note: This Question is unanswered, help us to find answer for this one

161.

A class can conform to only one protocol?

Answer

Correct Answer: False

Note: This Question is unanswered, help us to find answer for this one

162.

What is a category?

Answer

Correct Answer: A category is a way to add methods to a class which already exists

Note: This Question is unanswered, help us to find answer for this one

163.

What happens if you release an unretained object twice?

Answer

Correct Answer: Undefined behaviour

Note: This Question is unanswered, help us to find answer for this one

164.

What does Obj-C not support?

Answer

Correct Answer: Class variables

Note: This Question is unanswered, help us to find answer for this one

165.

Which of the following is the fastest?

Answer

Correct Answer: Explicit locking

Note: This Question is unanswered, help us to find answer for this one

166.

What is true regarding C functions inside .m files?

Answer

Correct Answer: They can contain Obj-C code
They can be static

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

167.

If you need to allocate custom memory, in which method will you do so?

Answer

Correct Answer: –init

Note: This Question is unanswered, help us to find answer for this one

168.

What is the Obj-C runtime?

Answer

Correct Answer: A C library

Note: This Question is unanswered, help us to find answer for this one

169.

What happens if two categories define methods with the same names for the same class?

Answer

Correct Answer: At runtime, either method will be called

Note: This Question is unanswered, help us to find answer for this one

170.

What is true regarding messaging?

Answer

Correct Answer: Messaging is fully dynamic, which means you can compile some code that sends a message to a class that doesn’t implement it, and add a category later, in a dynamic library for example

Note: This Question is unanswered, help us to find answer for this one

171.

A class can have two methods with the same name, but with different argument types?

Answer

Correct Answer: False

Note: This Question is unanswered, help us to find answer for this one

172.

What can you use to avoid the msgSend function overhead?

Answer

Correct Answer: IMP

Note: This Question is unanswered, help us to find answer for this one

173.

What is #import?

Answer

Correct Answer: C preprocessor construct to avoid multiple inclusions of the same file

Note: This Question is unanswered, help us to find answer for this one

174.

Which of the following creates a class that conforms to a protocol?

Answer

Correct Answer: @interface ClassName [ProtocolName]
@interface ClassName [ProtocolName]

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

175.

Can an exception caught in @catch be re-thrown?

Answer

Correct Answer: Yes

Note: This Question is unanswered, help us to find answer for this one

176.

What class specifiers are supported?

Answer

Correct Answer: There is no such thing as class specifiers.

Note: This Question is unanswered, help us to find answer for this one

177.

What will be the output of the following code?
static int
a (void)
{
printf ("a\n");
return 0;
}
static int
b (void)
{
printf ("b\n");
return 1;
}
static int
c (void)
{
printf ("c\n");
return 2;
}
int main (int argc, const char *argv[])
{
printf ("%d %d %d", a (), b (), c ());
return 0;
}

Answer

Correct Answer: c b a 0 1 2

Note: This Question is unanswered, help us to find answer for this one

178.

What is a SEL?

Answer

Correct Answer: The C type of a message selector

Note: This Question is unanswered, help us to find answer for this one

179.

What is the id type?

Answer

Correct Answer: A generic C type that Objective-C uses for an arbitrary object.

Note: This Question is unanswered, help us to find answer for this one

180.

What is the C type used to work with objects in Obj-C?

Answer

Correct Answer: pointer

Note: This Question is unanswered, help us to find answer for this one

181. What will be logged? int x = 1; __block int y = 1; void (^test)(void) = ^{ NSLog(@"%i, %i", x, y); }; x = 2; y = 2; test();

Answer

Correct Answer: 1, 2

Note: This Question is unanswered, help us to find answer for this one

182. What is true regarding messaging?

Answer

Correct Answer: Messaging is fully dynamic, which means you can compile some code that sends a message to a class that doesn't implement it, and add a category later, in a dynamic library for example

Note: This Question is unanswered, help us to find answer for this one

183. Which of the following is the fastest?

Answer

Correct Answer: Mutex implicit locking

Note: This Question is unanswered, help us to find answer for this one

184. A class can have two methods with the same name, but with different argument types.

Answer

Correct Answer: False

Note: This Question is unanswered, help us to find answer for this one

185. Why should you use an autorelease pool ?

Answer

Correct Answer: To avoid memory presure when creating a lot of autoreleased object (for example in a loop)

Note: This Question is unanswered, help us to find answer for this one

186. Which of the following statements is correct?

Answer

Correct Answer: @property(readwrite,retain,atomic)NSInteger value;

Note: This Question is unanswered, help us to find answer for this one

187. What сan you use to avoid msgSend function overhead?

Answer

Correct Answer: IMP

Note: This Question is unanswered, help us to find answer for this one

188. What happens if two categories define methods with the same names for the same class?

Answer

Correct Answer: At runtime, either method will be called

Note: This Question is unanswered, help us to find answer for this one

189. What happens at runtime with the following: NSMutableString *tempString = [NSMutableString stringWithString:@"1"]; dispatch_sync(dispatch_get_main_queue(), ^{ [tempString appendString:@"2"]; NSLog(@"%@", tempString); }); [tempString appendString:@"3"];

Answer

Correct Answer: Log doesn't print anything. It's a deadlock here because the main queue will block on the call to dispatch_sync

Note: This Question is unanswered, help us to find answer for this one

190. A UIView is a superclass of:

Answer

Correct Answer: UILabel

Note: This Question is unanswered, help us to find answer for this one

191. Which of these methods is NOT invoked by the runtime itself?

Answer

Correct Answer: -dealloc

Note: This Question is unanswered, help us to find answer for this one

192. How is a selector typically represented in memory?

Answer

Correct Answer: As a null terminated C string.

Note: This Question is unanswered, help us to find answer for this one

193. What's the difference between nil and NULL?

Answer

Correct Answer: nil is literal null value for Objective-C instances. NULL is literal null value for C pointers

Note: This Question is unanswered, help us to find answer for this one

194. A UITableViewController's tableview must have its delegate explicitly set by the developer.

Answer

Correct Answer: FALSE

Note: This Question is unanswered, help us to find answer for this one

195. How to restore Consumable In-App Purchases?

Answer

Correct Answer: Consumable In-App Purchases are not to be restored

Note: This Question is unanswered, help us to find answer for this one

196. What is the last chance for an object to handle a message?

Answer

Correct Answer: -forwardInvocation:

Note: This Question is unanswered, help us to find answer for this one

197. What can you say about the code: NSString * str = [NSString stringWithFormat:@""]; [str release];

Answer

Correct Answer: It will cause the string to be released twice with undefined consequences when the surrounding autorelease pool is emptied

Note: This Question is unanswered, help us to find answer for this one

198. What happens at runtime with the following: dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); dispatch_apply(10, queue, ^(size_t index) { NSLog(@"%zu", index); });

Answer

Correct Answer: We won't have persistent result

Note: This Question is unanswered, help us to find answer for this one

199. What class method is used to make an NSArray from NSData class?

Answer

Correct Answer: NSKeyedUnarchiver unarchiveObjectWithData:

Note: This Question is unanswered, help us to find answer for this one

200. What do you use for an outgoing TCP connection?

Answer

Correct Answer: NSStream

Note: This Question is unanswered, help us to find answer for this one

201. Which method, if defined, is guaranteed to be called once -- and only once -- when a class is first referenced?

Answer

Correct Answer: + (void) initialize;

Note: This Question is unanswered, help us to find answer for this one

202. If you wanted to override the default alloc method in a class Foo, what would be the appropriate way to declare it?

Answer

Correct Answer: + (id) alloc;

Note: This Question is unanswered, help us to find answer for this one

203. How do you convert a Core Image color to a UIColor?

Answer

Correct Answer: colorWithCIColor:

Note: This Question is unanswered, help us to find answer for this one

204. True or False? Key value coding is used to indirectly access an object's attributes using indexes.

Answer

Correct Answer: False

Note: This Question is unanswered, help us to find answer for this one

205. How do you add a brightening effect on a CoreImage?

Answer

Correct Answer: CIAdditionCompositing

Note: This Question is unanswered, help us to find answer for this one

206. What protocol is used to create an action object?

Answer

Correct Answer: CAAction

Note: This Question is unanswered, help us to find answer for this one

207. What is not supported in Objective-C

Answer

Correct Answer: Method argument default value

Note: This Question is unanswered, help us to find answer for this one

208. In Core Data, what is the name of the object representation for the database schema?

Answer

Correct Answer: NSManagedObjectModel

Note: This Question is unanswered, help us to find answer for this one

209. What does the following code do, assume ARC is enabled? NSArray *myArray; for (int i = 0; i < 10; i++){ @autoreleasepool { myArray = [[NSArray alloc]init]; } }

Answer

Correct Answer: For each iteration of the loop a new array is allocated and released.

Note: This Question is unanswered, help us to find answer for this one

210. What happens if you use fgets and do not give it a size smaller than the buffer?

Answer

Correct Answer: It will overwrite the data past the size

Note: This Question is unanswered, help us to find answer for this one

211. how can we return multiple values from function?

Answer

Correct Answer: tuple

Note: This Question is unanswered, help us to find answer for this one

212. True or False? You should use NSHost when connecting to a specific host.

Answer

Correct Answer: False (You should use CFHost)

Note: This Question is unanswered, help us to find answer for this one

213. Which of these classes is NOT a root class?

Answer

Correct Answer: NSString

Note: This Question is unanswered, help us to find answer for this one

214. What is the object.toString equivalent in objective-c?

Answer

Correct Answer: [NSObject description]

Note: This Question is unanswered, help us to find answer for this one

215. Objective-C methods with certain names (“init”, “alloc”, etc.) always return objects that are an instance of the receiving class’s type; such methods are said to have a “related result type”. A method with a related result type can be declared by using:

Answer

Correct Answer: instancetype

Note: This Question is unanswered, help us to find answer for this one

216. How can you temporarily disable layer actions in a Core Animation?

Answer

Correct Answer: Using the CATransaction class

Note: This Question is unanswered, help us to find answer for this one

217. What are the two types of predicates?

Answer

Correct Answer: Comparison and Compound

Note: This Question is unanswered, help us to find answer for this one

218. What is a persistent object store?

Answer

Correct Answer: It represents an external file of persisted data

Note: This Question is unanswered, help us to find answer for this one

219. True or False? You can perform operator overloading in Objective-C.

Answer

Correct Answer: False

Note: This Question is unanswered, help us to find answer for this one

220. The proper typedef syntax for an Objective-C block that takes an NSArray and returns an NSString is

Answer

Correct Answer: typedef NSString *(^aBlock)(NSArray *);

Note: This Question is unanswered, help us to find answer for this one

221. What is the difference between [Foo new] and [[Foo alloc] init]?

Answer

Correct Answer: None, they perform the same actions.

Note: This Question is unanswered, help us to find answer for this one

222. True or False? The format for a NSPredicate is the same as a Regular Expression.

Answer

Correct Answer: False

Note: This Question is unanswered, help us to find answer for this one

223. What is Objective-C's language design based on?

Answer

Correct Answer: C and Smalltalk.

Note: This Question is unanswered, help us to find answer for this one

224. What can happen if you use self inside a block?

Answer

Correct Answer: You can create a retain cycle

Note: This Question is unanswered, help us to find answer for this one

225. What is a proper format for calling an asynchronous function?

Answer

Correct Answer: dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), ^{ // code });

Note: This Question is unanswered, help us to find answer for this one

226. What is the 'print object' command in the debugger window?

Answer

Correct Answer: po

Note: This Question is unanswered, help us to find answer for this one

227. If you do not declare a return type for a method definition, what is the default return type?

Answer

Correct Answer: id

Note: This Question is unanswered, help us to find answer for this one

228. In Core Data, what is the name of an object representation of a record?

Answer

Correct Answer: NSManagedObject

Note: This Question is unanswered, help us to find answer for this one

229. What happens at runtime with the following: NSObject* object = nil; NSObject* object2 = [object copy]; NSLog(@"%@", object2);

Answer

Correct Answer: Log prints "(null)" and continues as usual.

Note: This Question is unanswered, help us to find answer for this one

230. Assume ARC is enabled... What would be another way to write this: NSArray *array = [NSArray arrayWithObjects:@"One", @"Two", @"Three",nil];

Answer

Correct Answer: NSArray *array = @[@"One", @"Two", @"Three"];

Note: This Question is unanswered, help us to find answer for this one

231. Are integers full-fledged objects in Objective-C?

Answer

Correct Answer: No, they are not objects at all.

Note: This Question is unanswered, help us to find answer for this one

232. What class will allow you to use one or more blocks concurrently?

Answer

Correct Answer: NSBlockOperation

Note: This Question is unanswered, help us to find answer for this one

233. Does Objective-C have constructors and destructors?

Answer

Correct Answer: No, you use init and dealloc on Objective-C

Note: This Question is unanswered, help us to find answer for this one

234. True or False? Strings are one of the most common sources of buffer overflow attacks.

Answer

Correct Answer: True

Note: This Question is unanswered, help us to find answer for this one

235. what does this code produce? [NSString] *myString = @"Hello World";

Answer

Correct Answer: An Error during compile

Note: This Question is unanswered, help us to find answer for this one

236. Can an exception caught in @ catch be re-thrown?

Answer

Correct Answer: Yes

Note: This Question is unanswered, help us to find answer for this one

237. let a:int=5 a=10 this code is true of false?

Answer

Correct Answer: false

Note: This Question is unanswered, help us to find answer for this one

238. Which of the following accesses a variable in structure b?

Answer

Correct Answer: b.var;

Note: This Question is unanswered, help us to find answer for this one

239. What framework is KVO (key value observing) a part of?

Answer

Correct Answer: Foundation

Note: This Question is unanswered, help us to find answer for this one

240. Using UIViewController containment, which one of the following statements is true:

Answer

Correct Answer: The root viewcontroller handles loading and unloading its child viewcontrollers.

Note: This Question is unanswered, help us to find answer for this one

241. How can you add a new method foo to an existing class Bar?

Answer

Correct Answer: Make a category, e.g. @interface Bar(Foo).

Note: This Question is unanswered, help us to find answer for this one

242. Which framework lets you determine the current location or heading associated with a device?

Answer

Correct Answer: CoreLocation

Note: This Question is unanswered, help us to find answer for this one

243. True or False? A method and a variable can have the same name in Objective-C.

Answer

Correct Answer: True

Note: This Question is unanswered, help us to find answer for this one

244. What is used to sort Core Data results?

Answer

Correct Answer: NSSortDescriptor

Note: This Question is unanswered, help us to find answer for this one

245. How do you get the Unicode character set of a Core Text font?

Answer

Correct Answer: CTFontCopyCharacterSet

Note: This Question is unanswered, help us to find answer for this one

246. What is the name of the type of SQL Database that iOS Supports?

Answer

Correct Answer: SQLite

Note: This Question is unanswered, help us to find answer for this one

247. Which of the following is an object?

Answer

Correct Answer: NSNumber

Note: This Question is unanswered, help us to find answer for this one

248. Where is a MKAnnotationView used?

Answer

Correct Answer: On a Map View

Note: This Question is unanswered, help us to find answer for this one

249. What is a delegate?

Answer

Correct Answer: A delegate allows one NSObject to send messages to another NSObject, and listen to those messages

Note: This Question is unanswered, help us to find answer for this one

250. ARC means?

Answer

Correct Answer: Automatic Reference Counting

Note: This Question is unanswered, help us to find answer for this one

251. What does an Objective-C string literal look like?

Answer

Correct Answer: @"foo"

Note: This Question is unanswered, help us to find answer for this one

252. If you define a new class called Foo which inherits from NSObject, how do you create a new instance of it?

Answer

Correct Answer: Foo *temp = [[Foo alloc] init];

Note: This Question is unanswered, help us to find answer for this one

253. What framework does the class UIButton come from?

Answer

Correct Answer: UIKit

Note: This Question is unanswered, help us to find answer for this one

254. Which of the following is a Singleton?

Answer

Correct Answer: [NSFileManager defaultManager]

Note: This Question is unanswered, help us to find answer for this one

255. How do you concatenate two NSStrings *foo and NSString *bar to form a new NSString *baz?

Answer

Correct Answer: baz = [foo stringByAppendingString: bar];

Note: This Question is unanswered, help us to find answer for this one

256. What does the "id" type mean?

Answer

Correct Answer: This is the general type for any kind of object regardless of class

Note: This Question is unanswered, help us to find answer for this one

257. To have an IOS app Screen Design we used which of the following tool?

Answer

Correct Answer: Interface builder

Note: This Question is unanswered, help us to find answer for this one

258. What is the method for adding KVO to your app?

Answer

Correct Answer: addObserver:forKeyPath:options:context

Note: This Question is unanswered, help us to find answer for this one

259. What type of object is this under XCode 4.5: @[rabbit, chicken, owl]

Answer

Correct Answer: NSArray

Note: This Question is unanswered, help us to find answer for this one

260. How do you free an object?

Answer

Correct Answer: [obj release]

Note: This Question is unanswered, help us to find answer for this one

261. How can you declare a method, that can be set as the action to be performed on various events?

Answer

Correct Answer: - (IBAction) action:(id) sender;

Note: This Question is unanswered, help us to find answer for this one

262. What happens when you call retain on an object?

Answer

Correct Answer: You increase its retain count by 1

Note: This Question is unanswered, help us to find answer for this one

263. Developers are allowed to call [super dealloc] in ARC.

Answer

Correct Answer: FALSE

Note: This Question is unanswered, help us to find answer for this one

264. What is the difference between methods that begin with + and -?

Answer

Correct Answer: Instance methods begin with - class level methods begin with +

Note: This Question is unanswered, help us to find answer for this one

265. What is the Allocations instrument used for?

Answer

Correct Answer: Recording information from a single process about memory allocation

Note: This Question is unanswered, help us to find answer for this one

266. What is a dependency in NSOperationQueue?

Answer

Correct Answer: A dependency is a way to have an operation wait to be performed until the dependencies have been fulfilled/executed

Note: This Question is unanswered, help us to find answer for this one

267. True or False? You can compare two strings by (string1 == string2)

Answer

Correct Answer: False

Note: This Question is unanswered, help us to find answer for this one