Restrictions of Generic Functions
Generic functions perform the same operation for all the versions of a function except the data type differs. Let’s see a simple example of an overloaded function which cannot be replaced by the generic function as both the functions have different functionalities. Example: In the above example, we overload the ordinary functions. We cannot overload…