Objective-C MCQ Test: Objective-C MCQs - Practice Questions
1. What is the purpose of the 'IBAction' keyword in Objective-C?
2. Which operator is used for equality comparison in Objective-C?
3. What is the purpose of the 'NSAutoreleasePool' class in Objective-C memory management?
4. What is the purpose of the 'dispatch_io' functions in Objective-C GCD?
5. What is the syntax for creating a comment in Objective-C?
6. How do you use 'NSPredicate' for complex filtering in Objective-C?
7. How do you create a custom exception in Objective-C?
8. What is the significance of the '__block' specifier in Objective-C?
9. What is the purpose of the 'init' method in Objective-C?
10. Explain the role of 'dispatch_data' in Objective-C GCD.
11. What is the purpose of the 'dispatch_semaphore' in Objective-C GCD?
12. How do you define a constant in Objective-C?
13. What is the purpose of the 'NSNotification' class in Objective-C?
14. How do you implement a protocol in Objective-C?
15. How do you use 'dispatch_semaphore_wait' in Objective-C GCD?
16. How do you implement 'copy' for your custom class in Objective-C?
17. What is the purpose of the 'NSRunLoopCommonModes' in Objective-C?
18. How do you handle memory management for properties in Objective-C?
19. What is the purpose of the 'nonatomic' property attribute in Objective-C?
20. How do you perform asynchronous image loading in Objective-C?
21. What is the purpose of the 'unowned' keyword in Objective-C ARC (Automatic Reference Counting)?
22. How do you create a deep copy of an NSArray in Objective-C?
23. Which method is called when an object is deallocated in Objective-C?
24. Which Objective-C framework is used for user interface development?
25. How do you perform background tasks in Objective-C?
26. What is the purpose of the 'autorelease' pool in Objective-C?
27. Which method is used for sorting an NSArray of custom objects based on a specific key in Objective-C?
28. What is the purpose of the 'NSPredicateEditor' in Objective-C?
29. How do you declare a block in Objective-C?
30. How do you implement multithreading in Objective-C?
31. Explain the concept of 'Grand Central Dispatch' (GCD) in Objective-C.
32. How do you create a singleton in Objective-C?
33. What is the purpose of the 'NSPredicate' class in Objective-C?
34. How do you implement 'NSFastEnumeration' in your custom class in Objective-C?
35. How do you import a header file in Objective-C?
36. What is the purpose of the 'dispatch_suspend' function in Objective-C GCD?
37. How do you handle exceptions in Objective-C?
38. What is the file extension for Objective-C source code files?
39. What is the purpose of the 'dispatch_once' function in Objective-C GCD?
40. What is the purpose of the 'NSRunLoop' class in Objective-C?
41. Which Objective-C framework is used for handling data persistence?
42. Explain the concept of 'method swizzling' in Objective-C.
43. Which symbol is used for string concatenation in Objective-C?
44. Which keyword is used to define a protocol in Objective-C?
45. How do you create a loop in Objective-C?
46. What is the purpose of the '__weak' specifier in Objective-C?
47. What is the purpose of the 'instancetype' keyword in Objective-C?
48. Which symbol is used for pointers in Objective-C?
49. What is the purpose of the 'dispatch_after' function in Objective-C GCD?
50. What is the purpose of the 'dispatch_apply' function in Objective-C GCD?