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 typical about a windows process in regards to memory allocation in .net?

562


What is the difference between asp.net & vb.net and explain architecture?

542


Tell us the difference between the while and for loop. Provide a .net syntax for both loops?

546


When should I use .net core?

565


What versions of .net are there?

634






What is Ajax? How it is related to your project?

631


What are the features of dot net?

551


Compare & contrast rich client (smart clients or windows-based) & browser-based web application

550


Tell us what is the native image generator?

586


What is the reason of occurring overflow-underflow arithmetic exception error, it shows error message when we run our program by adding control?

523


Describe the compilation process for .net code?

619


Is there built-in support for tracing?

594


Explain what is mutex?

602


One user deleted one row after that another user through his dataset was trying to update same row. What will happen? How will you avoid this problem?

533


What is data type and how many types of data types are in .NET ?

564