Difference ways of Polymorphism?
Answers were Sorted based on User's Feedback
Answer / zeeshan
Polymorphism can be achieved by two ways:
1.Overloading 2.Overriding
1.Overloading: Overloading means methods have same name but
different arguments it can be achieved at Compile Time.
1.Overriding: Overloading means when we make method virtual
in base class and we also want that it also used in child
then we use override keyword for that method and and it can
be achieved at Run Time.
| Is This Answer Correct ? | 21 Yes | 1 No |
Answer / siva sankari
lets take some eg:
6+3=9 //here '+'operator used as addition
siva+sankari=sivasankari //here '+' operator used as
concatenation
the same function which acts as diff place in diff meaning
is called polymorphism............
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / sanjeevkumar.v
polymorphism it means the function may be different . and so
that are different forms
| Is This Answer Correct ? | 2 Yes | 9 No |
what i oops concept, how many languages supports oops concept?
what is Class in oops with example?
What is polymorphism and types?
What is difference between function overloading and overriding?
What is object and class in oops?
What is this interview room ? Is it a class or an object.
Please send ford technologies placement paper 2 my mail id
Can we create object of interface?
1.explicit call for destructor 2.calling function inside a constructor. 3.base *b-new derived delete b; 4.delete p what it will delete. 5.size of base class and derived class int i,in base class and int j in derived. 6.int i-20 int main() { int i =5; printf("%d".::i); { int i =10; printf("%d".::i); } } 7.object slicing 8.new 9.function overloading(return type). 10.class base() { virtuval fun() { ----- } } class derivied:public base() { fun() { ----- } } int main() { derived d; } 11.how static function will call in C++? 12.default structures are in C++? 13.constructors should be in public . 14.virtuval constructor not exist. 15.multilevel inhritence. destructor order.
What is the benefit of oop?
What are the different forms of polymorphism??
What is the output of the following code: int v() { int m=0; return m++; } int main() { cout<<v(); } 1) 1 2) 0 3) Code cannot compile