In OverLoading concept,Why they are not consider return
value and why they are consider only parameters in method?
For ex: public int Add(int a,int b){...}
public String Add(int a,int b){...}

Answer Posted / brunda r

Because, if at all the return value is same then compiler
should identify the functions by their parameters.

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can you overcome the diamond problem in inheritance?

768


What is difference between oop and pop?

618


What is object in oop?

679


assume the program must insert 4 elements from the key board and then do the following programs.sequential search(search one of the elements),using insertion sort(sort the element) and using selection sort(sort the element).

1664


How long to learn object oriented programming?

565






What does oop mean in snapchat?

684


Advantage and disadvantage of routing in telecom sector

786


What is use of overloading?

608


They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?

1405


Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.

2008


What is abstraction encapsulation?

657


What are oops functions?

583


just right the logic of it 1--> If few people are electing then every time ur candidate should win 2--> arrange books in box, if box carry weight == books weight then take another box..... find the no of box required.

6485


Are polymorphisms mutations?

703


class CTest { public: void someMethod() { int nCount = 0; cout << "This is some method --> " << nCount; } }; int main() { CTest *pctest; pctest->someMethod(); return 0; } It will executes the someMethod() and displays the value too. how is it possible with our creating memory for the class . i think iam not creating object for the class. Thanks in Advance... Prakash

1698