The function arguments can be objects and passed in two ways namely pass by value and pass by reference. In pass by value, a copy of the object as actual argument is passed to the function and formal arguments of function which of class type receive the copy of the actual argument and process it.
Any changes made in the formal argument inside the function body will not reflect in actual arguments.
In pass by reference, the address of an object is passed as actual argument and formal argument holds the address of objects of actual arguments. Any changes made to formal argument in the function body will reflect in the actual argument since it holds the actual address of actual argument objects.
The pass by value example:
The objects of same class can be passed as arguments to a function.
The line obj3.multi (obj1, obj2); pass obj1 and obj2 which are the objects of class rup type.