1. Which of the following is a valid Uniform Type Identifier?
2. Is the following code correct? NSMutableArray *a = [NSMutableArray new]; // do something with a [a release];
3. Is the following code correct? NSMutableArray *a = [[NSMutableArray new] autorelease]; // do something with a [a release];
4. Is the following code correct? NSMutableArray *a = [NSMutableArray array]; // do something with a [a release];
5. Is the following code correct? NSRect a = NSMakeRect(0, 1, 2, 3) + NSMakeRect(0, 1, 2, 3);
6. If you call interpretKeyEvents:, which of the following method is likely to be called?
7. What will be the output of the following code? NSRect rect = NSMakeRect(0, 0, 10, 10); NSRect *rect2 = malloc(sizeof(*rect2)); if(!rect2) { NSLog(@'Not enough memory.'); exit(EXIT_FAILURE); } *rect2 = rect; printf('%d\n', rect.size.width);
8. Is NSRunLoop thread safe?
9. Can an object marked for autorelease be retained?
10. Fill the blank NSView : <> : NSObject
11. Can you use NSLock on a POSIX mutex?
12. What kind of memory management mechanisms can Cocoa uses?
13. Which of the following retrieves the application main bundle?
14. Is it possible to create events and dispatch them to the application?
15. What is Cocoa?
16. Is the following code correct? - (void)myMethod:(NSString **)s { *s = [[NSString alloc] init]; }
17. What is true regarding notifications?
18. What threading API should be used in Cocoa?
19. Is the following code valid? NSRect r; r.size = NSMakeSize(10,10); r.origin = NSMakePoint(-5, -5);
20. Where is the (0,0) coordinate located on the screen?
21. Can NSBundle be used to load Java code?
22. Fill the blank. NSNotification : <> : NSObject
23. Is there a double click event?
24. What is a toll-free bridged class?
25. Can resources be localized?
26. How can you move a view?
27. Why is CGFloat recommenced to be used instead of float?
28. Which of the following creates an autoreleased array?
29. What is NSViewHeightSizable constant used for?
30. Can POSIX thread be used in Cocoa?
31. Is it correct to have sibling views overlapping?
32. What method should be called before you are able to draw in the drawRect: method of a view?
33. Can a notified object find out from where the notification is coming? (Sending Object)
34. In a typical Cocoa application, do you have to manage your runloop yourself?
35. Does Cocoa support 64bits?
36. What is a notification?
37. Is the following code valid? NSSize s = NSMakeSize(10, 10); int values[20]; values[s.height] = 5;
38. Can you detach threads in Cocoa?
39. Can NSDistributedNotificationCenter be used to communicate between multiple machines?
40. Which of the following classes manages the computer’s global notifications?
41. Fill the blank NSMutableArray : <> : NSObject
42. What method should be called before you are able to draw outside the drawRect: method of a view?
43. If you spawn a thread with POSIX thread api, will Cocoa be notified?
44. What is NSRect?
45. Fill the blank. NSCountedSet : <> : NSObject
46. How is a GUI usually created in Cocoa?
47. What is the normal way of handling cocoa events?
48. Where should application resources be usually put?
49. Which of the following platforms supports Cocoa?
50. Can an object be the delegate of multiple objects?
51. How wide is unichar on a 32bit machine?
52. Can you use malloc/free in a Cocoa application?
53. Fill the blank. NSButton : <> : NSObject
54. What is an observer?
55. Can poll() be used to fetch Cocoa events?
56. What class should be used to load resources?
57. Is it mandatory to create an NSAutoreleasePool in a Cocoa application?
58. Is NSString mutable?
59. In which language is Cocoa written?
60. Under Mac OS X 10.5, CGRect, CGSize and CGPoint have the same structure as NSRect, NSSize and NSPoint respectively. Is it true?
61. The ________ object is the application's main controlling object.
62. A ______ object sends a message automatically to a target when an on-screen object is manipulated.
63. Which does not belong in web infrastructure:
64. Which one is not a Navigator in Xcode?
65. ________ are NOT a Cocoa event.
66. What does the Interface Builder in Xcode do?
67. The Mac OS X _______ replaces the Mac OS 9 Application menu.
68. _______ is not a subclass of NSResponder.
69. The ______ is a section of code that reads events and performs appropriate functions for those events.
70. The ________ is a framework that contains all the objects needed to implement a graphical event-driven user interface.
71. The Mac OS X graphical user interface (GUI) is called _________.
72. True or False? NSNumber objects cannot be changed after initialization.
73. NSDocument class is used for ______.
74. A Cocoa ______ is a message and a corresponding object sent to an application in response to some action taken by the user.
75. True or False? Memory management is completely automatic.
76. ______ is NOT a type of Mac OS X on-screen window.
77. In Xcode, what does the Identity Inspector do?
78. _______ class allows you to journal events in your application.
79. _______ is the object persistence framework included with Foundation Kit.
80. ______ is Apple's computing infrastructure that consists of Mach, Unix services, and Mac OS X networking and filesystems.
81. ______ class will implement a mutex.
82. Which control can the user add a small piece of data?
83. In the XCode window, the _____ lists files, search results, and build settings.
84. True or False? Objective-C is a static typed language.
85. In the Interface Builder, the _______ contains stock items in Cocoa that you can drag-and-drop into your application.
86. Which control wold you want to use as a data source?
87. True or False? Objective-C does not have a constructor or destructor.
88. Objective-C uses the concept of ______ which allows modifications to an existing class in-place.
89. In Objective-C, methods are represented by a ______ which is a string describing the method to call.
90. What does GCD stand for?
91. True or False? Cocoa allows you to move objects in the main nib to other separate nibs to improve load performance.
92. The most commonly used debugger used with Cocoa is ______.
93. A property:
94. What are atomic and nonatomic associated with?
95. True or False? A Cocoa program may not be compiled from a command-line prompt.
96. The 'NS' in NSObject stands for:
97. True or False? Objective-C classes are objects.
98. Imutable objects can't be__:
99. A _________ file stores all information about an application's user interface objects.
100. Whenever you customize an existing class, it is called:
Computer Networking
DB2 Administration
DB2 Programming
DHTML
DOS
Data Structures and Algorithms
Related MCQ's