WHY FUCTION OVERLOADING DOSENOT RETURN A RETEN TYPE
Answer Posted / subhashish sen
I think the Question is wrong !!!!!The Question would have
been like this..
Why Function Overloading does not depend on the return type?
Ans : Function Overloading does not depend on the return
type but it depends on number, type and order of arguments
of function..
In this case Overloading Possible
-----------------------------------
Ex : int fun(int a,int b){}
int fun(int x,float y){}
In this case Overloading is not possible
---------------------------------------
int fun(int a,int b){}
float fun(int x,float y){}
The reason is..while invoking these function its not
necessary to get the return value always,means if you don't
get the return value it also works...But this wont be
possible for no,type or order of arguments..
If you need further clarification reply me....
| Is This Answer Correct ? | 12 Yes | 10 No |
Post New Answer View All Answers
Where You Can Use Interface in your Project
What is the full form of oops?
Write a program to implement OOPS concepts such as inheritance, polymorphism, friend function, operator overloading?
Write a program to compute for numeric grades for a course. The course records are in a file that will serve as the input file. The input file is in exactly the following format: Each line contains a student's first name, then one space, then ten quiz scores all on one line. The quiz scores are in whole number and are separated by one space. Your program will take it input from this file and sends it output to a second file. The data in the output file will be exactly the same as the data in the input file except that there will be one additional number (of type double) at the end of each line. This number will be the average of the student's ten quiz scores. Use at least one function that has file streams as all or some of its arguments.
What is pure oop?
What is difference between inheritance and polymorphism?
What is oops concept with example?
what type of question are asked in thoughtworks pair programming round ?
#include
which feature are not hold visual basic of oop?
What is difference between abstraction and encapsulation?
How can you overcome the diamond problem in inheritance?
What is interface in oop?
What are main features of oop?
What is class and object with example?