How can we put nil it into dictionary/array?



How can we put nil it into dictionary/array?..

Answer / Rakhi Kumari

In Objective-C, you can add nil to arrays and dictionaries by simply assigning them. For example: NSMutableArray *myArray = [NSMutableArray array]; myArray[0] = nil; NSDictionary *myDict = @{@"key": nil};

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Objective-C Interview Questions

How do you call a method in objective c?

1 Answers  


What is delegate in objective c?

1 Answers  


Why is objective c used?

1 Answers  


What is an extension?

1 Answers  


What are the rules of variable?

1 Answers  


Is swift based on objective c?

1 Answers  


When should you call dealloc method?

1 Answers  


What is toll-free bridging? When is it useful?

1 Answers  


How to add custom cell in uitableview in objective c?

1 Answers  


Who calls dealloc method? Can we implement dealloc in arc? If yes, what is the need to do that?

1 Answers  


Explain what do you mean by synthesized in objective-c?

1 Answers  


How can we put nil it into dictionary/array?

1 Answers  


Categories