Computer Science, asked by kingcyt, 9 months ago

State the two criteria necessary for function overloading?​

Answers

Answered by bhooshanchand78
7

Answer:

for the function of overloading the functions name must be same for example:

public static void area(in a)

public static void area (in a)

the data type and the name must be same for the various functions will be used . But do not change the main name. that is public static void main (string ARGS ) this process is also called polymorphism

I hope its helpful

Answered by umayashaswinee97
2

Answer:

In order to overload a function, the function names should be same.

To overload the different functions:

1. We can vary the number of parameters passing through the functions.

Eg. void fun ( int a);

     void fun (int a, int b);

2. We can vary the datatypes while passing the parameters.

Eg. void fun (int a);

     void fun (float a);

Similar questions