If you pass an object to a function by value, we pass a copy of the value object, and this is called a copy constructor. As a parameter to a function is an object of class A1, then the copy constructor is invoked for the A1, therefore the copy will be an object of class A1. If the object was passed by value and by reference then volunteered would function k() of class B1, because it is declared virtual.
Login in to like
Login in to comment