1. True or False? You can compare two strings by (string1 == string2)
2. What is a dependency in NSOperationQueue?
3. What is the Allocations instrument used for?
4. What is KVO?
5. What is the difference between methods that begin with + and -?
6. Developers are allowed to call [super dealloc] in ARC.
7. What happens when you call retain on an object?
8. How can you declare a method, that can be set as the action to be performed on various events?
9. What does a CAEmitterCell do?
10. How do you free an object?
11. What type of object is this under XCode 4.5: @[rabbit, chicken, owl]
12. What is the method for adding KVO to your app?
13. To have an IOS app Screen Design we used which of the following tool?
14. What does the "id" type mean?
15. How do you concatenate two NSStrings *foo and NSString *bar to form a new NSString *baz?
16. Which of the following is a Singleton?
17. What framework does the class UIButton come from?
18. If you define a new class called Foo which inherits from NSObject, how do you create a new instance of it?
19. What does an Objective-C string literal look like?
20. ARC means?
21. What is a delegate?
22. Where is a MKAnnotationView used?
23. Which of the following is an object?
24. What is the name of the type of SQL Database that iOS Supports?
25. How do you get the Unicode character set of a Core Text font?
26. What is used to sort Core Data results?
27. True or False? A method and a variable can have the same name in Objective-C.
28. Which framework lets you determine the current location or heading associated with a device?
29. How can you add a new method foo to an existing class Bar?
30. If a class conforms to a protocol what must it do?
31. What is a design pattern?
32. True or False? For an object to use constraints, it must have at least 3 constraint values.
33. Using UIViewController containment, which one of the following statements is true:
34. What framework is KVO (key value observing) a part of?
35. Which of the following accesses a variable in structure b?
36. let a:int=5 a=10 this code is true of false?
37. Can an exception caught in @ catch be re-thrown?
38. what does this code produce? [NSString] *myString = @"Hello World";
39. True or False? Strings are one of the most common sources of buffer overflow attacks.
40. Does Objective-C have constructors and destructors?
41. What is the type of @selector(foo)?
42. What class will allow you to use one or more blocks concurrently?
43. What is @dynamic directive meaning in iOS?
44. Are integers full-fledged objects in Objective-C?
45. Assume ARC is enabled... What would be another way to write this: NSArray *array = [NSArray arrayWithObjects:@"One", @"Two", @"Three",nil];
46. What happens at runtime with the following: NSObject* object = nil; NSObject* object2 = [object copy]; NSLog(@"%@", object2);
47. What is one source of particles that are emitted by a CAEmitterLayer object?
48. In Core Data, what is the name of an object representation of a record?
49. If you do not declare a return type for a method definition, what is the default return type?
50. What is the 'print object' command in the debugger window?
51. What is a proper format for calling an asynchronous function?
52. What can happen if you use self inside a block?
53. What is Objective-C's language design based on?
54. True or False? The format for a NSPredicate is the same as a Regular Expression.
55. What is the difference between [Foo new] and [[Foo alloc] init]?
56. The proper typedef syntax for an Objective-C block that takes an NSArray and returns an NSString is
57. True or False? You can perform operator overloading in Objective-C.
58. What is the difference between #import and #include ?
59. What is a persistent object store?
60. What are the two types of predicates?
61. What is (void*)0 ?
62. How can you temporarily disable layer actions in a Core Animation?
63. 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:
64. What is the object.toString equivalent in objective-c?
65. Which of these classes is NOT a root class?
66. True or False? You should use NSHost when connecting to a specific host.
67. how can we return multiple values from function?
68. What happens if you use fgets and do not give it a size smaller than the buffer?
69. What does the following code do, assume ARC is enabled? NSArray *myArray; for (int i = 0; i < 10; i++){ @autoreleasepool { myArray = [[NSArray alloc]init]; } }
70. In Core Data, what is the name of the object representation for the database schema?
71. What is not supported in Objective-C
72. What protocol is used to create an action object?
73. How do you add a brightening effect on a CoreImage?
74. True or False? Key value coding is used to indirectly access an object's attributes using indexes.
75. How do you convert a Core Image color to a UIColor?
76. If you wanted to override the default alloc method in a class Foo, what would be the appropriate way to declare it?
77. Which method, if defined, is guaranteed to be called once -- and only once -- when a class is first referenced?
78. What do you use for an outgoing TCP connection?
79. What class method is used to make an NSArray from NSData class?
80. 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); });
81. What can you say about the code: NSString * str = [NSString stringWithFormat:@""]; [str release];
82. What is the last chance for an object to handle a message?
83. How to restore Consumable In-App Purchases?
84. A UITableViewController's tableview must have its delegate explicitly set by the developer.
85. What are @try and @catch?
86. What's the difference between nil and NULL?
87. How is a selector typically represented in memory?
88. Which of these methods is NOT invoked by the runtime itself?
89. A UIView is a superclass of:
90. 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"];
91. What happens if two categories define methods with the same names for the same class?
92. What сan you use to avoid msgSend function overhead?
93. Which of the following statements is correct?
94. Why should you use an autorelease pool ?
95. A class can have two methods with the same name, but with different argument types.
96. Which of the following is the fastest?
97. What is true regarding messaging?
98. What will be logged? int x = 1; __block int y = 1; void (^test)(void) = ^{ NSLog(@"%i, %i", x, y); }; x = 2; y = 2; test();
99. What is the C type used to work with objects in Obj-C?
100. What is the id type?
101. What is a SEL?
102. Output of the following code?
103. What class specifiers are supported?
104. Can an exception caught in @catch be re-thrown?
105. Which of the following creates a class that conforms to a protocol?
106. What is #import?
107. What can you use to avoid the msgSend function overhead?
108. A class can have two methods with the same name, but with different argument types?
109. What is true regarding messaging?
110. What happens if two categories define methods with the same names for the same class?
111. What is the Obj-C runtime?
112. If you need to allocate custom memory, in which method will you do so?
113. What is true regarding C functions inside .m files?
114. Which of the following is the fastest?
115. What does Obj-C not support?
116. What happens if you release an unretained object twice?
117. What is a category?
118. A class can conform to only one protocol?
119. In which version of Objective-C did the fast enumeration system appear?
120. What is true regarding strings?
121. In Obj-C 2.0, what do the fast enumeration protocols rely on to provide fast Enumerations?
122. What is nil?
123. Which C feature is not supported in Obj-C?
124. What type of variable do you need to use to implement singletons?
125. What is true regarding @protected?
126. How do you allocate an object?
127. When using the garbage collector, which method, that is normally called without the collector, is not called on your objects where they are collected?
128. A method can be tagged to be called only by a specific class and its subclasses.
129. What does the following imply?
130. What is true regarding @public?
131. What comments are supported in Obj-C?
132. Is the following code a correct allocation?
133. What is not supported in Obj-C?
134. What are @try and @catch?
135. Which of the following is false?
136. Default visibility for instance variables?
137. Can a method be declared to accept a variable number of arguments?
138. What is an autoreleased object?
139. Which one can be inherited?
140. Which one is not recommended?
141. In which version of Objective-C did the properties system appear?
142. Which one does not happen when you throw an exception in a @synchronized block?
143. What is the isa variable in objects?
144. Can you send messages to nil?
145. Difference between copy and deepCopy?
146. How do you throw an exception?
147. What is a @finally block?
148. What can be used as Object instance variables?
149. What is a protocol?
150. How do you include the root 'Object' class?
151. Which one declares a protocol?
152. Protocols are like classes; they can inherit
153. Which of the following is incorrect?
154. What is an IMP?
155. What can be linked to an Obj-C program without any particular process?
156. What can you do with categories?
157. Difference between the unsigned int and the NSUInteger?
158. How do you free an object?
159. What is a class object?
160. Two additional foundational building blocks of Objective-C distinct from data and procedure type foundations: ..... and Categories/Extensions?
161. Name of the root class in Objective-C?
162. Look at below code and tell what the problem could be:
163. Look at below code and tell which is correct.
164. Difference between the unsigned int and the NSUInteger?
165. 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:
166. The property attribute that causes the setter to store a strong reference to the assigned value is called:
167. Proper answer about the difference between nil and NULL?
168. Where is a MKAnnotationView used?
169. Difference between #import and #include?
170. What is category in Objective-C?
171. Which one contains the INCORRECT definition of a bitwise operator ?
172. While calling a function by reference, it will copy the address of an argument into the formal parameter.
173. Which one contains the INCORRECT definition of a preprocessor directive ?
174. In (...), the system uses the same reference counting system as (...), but it inserts the appropriate memory management method calls for us at compile-time.
175. Which one contains the INCORRECT definition of a Predefined Macro ?
176. What's the hierarchy of UIButton until NSObject ?
177. (...) are used by Cocoa and Cocoa Touch objects for a variety of different situations
178. 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.
179. 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.
180. Which one is not a property of NSError class?
181. Exceptions can be handled using the standard a common pattern found in most other high-level programming languages
182. Two distinct types of problems can arise while an iOS or OS X application is running.
183. In Objective-C programming, error handling is provided with (...) class available in Foundation framework.
184. (...) 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.
185. The (...) method can be used to see if an object belongs to a class that implements a particular protocol.
186. In Objective-C, retain counts are the way in which memory is managed in Objective-C
187. A derived class can access all the private members of its base class if it's defined in the interface class
188. Which one is correct (legal) floating-point literal ?
189. What happens when the following code executes?
190. Objective-C is a general-purpose, object-oriented programming language that adds Smalltalk-style messaging to the (...) programming language
191. 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 ?
192. Which method creates and returns an NSNumber object containing a given value, treating it as an NSInteger.
193. Which one is the base class of all objects in Objective-c ?
194. The description above is essentially related to which feature of Objective-C programming language ?
195. Objective-C allows you to define protocols, which declare the methods expected to be used for a particular situation.
196. In Objective-C, retain counts are the way in which memory is managed.
197. Memory management is one of the most important processes in any programming language
198. Which one is NOT correct regarding memory management in Objective-C ?
199. Which one contains an INCORRECT concept regarding Objective-C programming ?
200. 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.
201. 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 ...
202. Which one contain an INCORRECT way to declare and initialize an array ?
203. Most proper answer to load plist file contents into an array?
204. Property attribute that synthesizes only a getter for the property?
205. How do you search an object in an object array?
206. An object id with a value of 0?
207. Please pick the most suitable difference between alloc and dealloc?
208. What will be the output of following code?
209. Look at below code and provide the reference counter value after it executes:
210. Which one is a Singleton?
211. Can you call C++ code from the Objective-C environment?
212. What is a local variable that has no default initial value and does not retain its value through method calls?
213. Look at below code and tell correct output?
214. Where does Objective C store objects, Heap or stack?
215. Name a property attribute that synthesizes accessors that are not thread safe?
216. Best way to convert NSNumber into NSString?
217. Consider below declaration of Song object and tell proper way to call name property?
218. Considering the following Objective-C code, what will get printed:
219. The Objective-C code ... @interface MyClass : NSObject ... @end
220. Which one is NOT correct about Protocols ?
221. In which situation you would NOT use void types?
222. The following Objective-C code defines
223. When the above code is compiled and executed, it produces the following result:
224. Considering best practices of memory management in Objective-C, is it correct to say that the delegate is never retained ?
225. if I call performSelector:withObject:afterDelay: – is the object retained ?
226. Which one is NOT correct to state about Objective-C language ?
227. It's possible to add a (...) to the standard NSString class, for example, to extend its functionality.
228. Which one is a correct sample of block implementation in Objective-C?
229. Considering the Objective-C code, which statement is correct ?
230. Considering the following Objective-c snippet, which one is NOT correct ?
231. When an object's retainCount reaches 0, which message is automatically sent to that Object?
232. All of the methods in a (...) annotated with @required must be implemented.
233. Using object-oriented programming the object that sends a message
234. As categories can't have instance variables, what class could you use to implement a full class only with categories
235. If a is an integer, the expression !a (...)?
236. Which of the following is true?
237. Which are valid property annotations?
238. Correct name of memory management method?
239. Correct code to include C 'Header.h' header in Objective-C '.m' source file?
240. Correct statement to declare a new protocol?
241. If there was no '@catch' block specified for handling exceptions, what will happen then?
242. Which one is NOT a predefined exception class name?
243. Which statement about protocols is true?
244. Right after an exception occurs, your program executes the code from the:
245. When deleting a CoreData NSManagedObject, you can specify to also delete its properties from the database, by setting a rule called:
246. Correct statement for declaring a new category for UIColor class?
247. 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?
248. A proper implementation of 'dealloc' method in your custom class must include:
249. Which one is an animatable property of a CALayer object?
250. Which one is a valid property name of the NSError class?
251. Which of the following is true?
252. Which one is a valid attribute for a property declared in protocol?
253. Which one is a valid generics type definition?
254. To create an animation, which starts slowly, but then accelerates as it progresses, you will use:
255. Which of these classes are collections?
256. If you need to raise a new exception, you will use:
257. Which one is a valid property name of the NSException class?
258. What’s the hierarchy of UITextView class until NSObject?
259. What will be printed on screen after running the following code?
260. To display some web page, Apple provides a predefined class called:
261. For permanent storage of some data Apple provides:
262. Property defaults include _?
263. What is the key difference between NSDictionary and NSMutableDictionary?
264. What is foo? -(float)foo;
265. What's wrong with this code?float x = 5.;
266. What does ARC stand for?
267. What best describes class inheritance in Objective-C?
268. What is different about this function? +(void)doSomething;
269. Structs can have _?
270. What is an enums base type for the code below? typedef enum { Foo1, Foo2} Foo;
271. If you want to store a small amount of information (e.g., user settings), whats the best, built-in way to go?
272. What are categories used for?
273. What is this a declaration of? int(^foo)(int);
274. What's the difference between an array and a set?
275. Dot notation can be used for _?
276. What is significant about this function declaration? -(void)testFunc:(NSString**)str;
277. You are worried about threaded access to a property and possible collision in writing. What directive should you use on the property?
278. What is wrong with this line of code? int temp = 1==1;