Answers/Solutions to Exercises in Chapter 5, Exercise 8

E8: Is there any difference between C and C++ concerning calling functions and passing arguments to the them?

A8: Yes, there is. C passes all arguments strictly by value only. C++ allows to stipulate also passing by reference, so both forms -- by value or by reference -- can be used. It can be also considered as a difference -- C++ allows polymorphism and thus function calls are not only determined by the name of the function being called (as in C), but also by the signature.

Back to Answers/Solutions Index                          Back to Answers/Solutions for Chapter 5 Index