i have 2 functions, int add(int a,int b);
double add(int a,int b); does this code implement
overloading? if not what will be the error?

Answer Posted / suren

That will throw an error coz in the second function the
return type is double and result will be in double. to
rectify it we need to convert the second function result as
double, then the code executes correctly.

Is This Answer Correct ?    1 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a formatter in .net?

578


Is .net core installed?

530


How can I find out what the garbage collector is doing?

540


What is reflection and what is it for?

576


What is the difference between an abstract class and an interface?

509






Should I implement finalize on my class? Should I implement idisposable?

550


What is deferred execution vs. Immediate execution in linq?

571


Explain the .net framework overview?

575


How to get the number after decimal point in .net?

570


Explain dataset.acceptchanges and dataadapter.update methods in .net?

559


SAP Business One(this is intigrated tool of .net)

1782


Describe the Managed Execution Process

1653


Name the classes that are introduced in the system.numerics namespace.

633


What is RPC? What is the use of it?

610


Where does the gac exist ?

580