What is the main difference between function calls and messages?



What is the main difference between function calls and messages?..

Answer / Uttam Singh Kutiyal

In Objective-C, a function call is a way to invoke a method on an object directly, whereas a message is a way of invoking a method on an object indirectly. Messages are more flexible as they allow for polymorphism (same message can be sent to different objects that implement the same method), and also support key-value coding (accessing methods via keys).

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Objective-C Interview Questions

What is the difference between a script file and a function matlab?

1 Answers  


What is difference between c and objective c?

1 Answers  


What happens if you add your just created object to a mutable array, and you release your object?

1 Answers  


What is the latest version of objective-c?

1 Answers  


How much does m files cost?

1 Answers  


Tell us the result when you invoke a particular method on a nil pointer?

1 Answers  


Explain when to use nsarray and nsmutablearray. Which one is faster and threadsafe?

1 Answers  


What do you mean by synthesized in objective-c?

1 Answers  


What is the difference between weak and unowned?

1 Answers  


What is typedef objective c?

1 Answers  


Why do we require class extension?

1 Answers  


What is atomic in objective c?

1 Answers  


Categories