What can’t we put into an array or dictionary?



What can’t we put into an array or dictionary?..

Answer / Pranaw Kumara

In Objective-C, you cannot add non-object types such as primitive data types (like int, char, float) directly into arrays or dictionaries. To use these types, you would typically wrap them in NSNumber objects before adding to collections.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Objective-C Interview Questions

What do you mean by @synthesize and @dynamic in the objective-c?

1 Answers  


What is protocol with example?

1 Answers  


Explain the difference between #import and #include in objective-c?

1 Answers  


What is a function file?

1 Answers  


What is the difference between nsstring and string?

1 Answers  


Can objective c run on windows?

1 Answers  


Is reference counting garbage collection?

1 Answers  


What does the m mean in xcode?

1 Answers  


What is the purpose of the protocol?

1 Answers  


What is difference between mutable and immutable?

1 Answers  


How messaging works in objective-c?

1 Answers  


Can a protocol have properties?

1 Answers  


Categories