How is #import different from #include?
Answer / Pooja Vishwakarma
#import and #include are both used for including headers in Objective-C, but they have slightly different behaviors. #import creates unique instances of the header files to prevent multiple inclusion, while #include simply includes the content of the header file regardless of whether it has already been included or not. This can lead to issues when using #include with system headers that define macros.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is assign property in objective c?
What are the types of ios binaries you can create using xcode?
What is a dispatch method?
What is objective c written in?
What is main storyboard?
Can you use swift and objective c together?
How declare methods in objective c?
What is atomic property?
What happens when you create a block?
What does @synchronized() do?
What are nsautoreleasepool?
Explain how the class “implementation” is represented in objective-c?