In this program there are 2 functions named Swap. How does the program recognize which Swap function to use when Swap is called. Does it recognize with the help of parameters or is it something else?
Swap function calling
yes it recognizes it with the help of
- no of parameters
- type of parameters
- return type
This is called run time polymorphism