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's the difference between a thread safe and a thread unsafe function?
What is atomic property?
Can objective c run on windows?
What is m files document management?
How to call a function in objective-c?
Is swift objective c?
Who calls dealloc method?
What are the rules for identifiers?
Who calls dealloc method? Can we implement dealloc in arc? If yes, what is the need to do that?
What objective-c program consists of?
What is enum constant?
Does objective-c contain private strategies?