What is sub classing in c++?
Answer / ashok kumar
which class inherited from base class is called sub class
| Is This Answer Correct ? | 3 Yes | 0 No |
What is ambiguity in inheritance?
Write a program in c++ to read two floating point numbers and find their sum and average.
Can you inherit a private class?
write string class as your own class in java without using any built-in function
Can we have inheritance without polymorphism?
what is multithreading in c++ , what is difference between multithreading and singlethreading.
What are the valid types of data that the main () can return in C/C++ language
What is abstraction encapsulation?
What is Object and Class? What are the differences between them?
write a function that takes an integer array as an input and finds the largest number in the array. You can not sort array or use any API or searching needs?
2 Answers IBMS, Zycus Infotech,
suppose A is a base class and B is the derved class. Both have a method foo which is defined as a virtual method in the base class. You have a pointer of classs B and you typecast it to A. Now when you call pointer->foo, which method gets called? The next part of the question is, how does the compiler know which method to call?
What is polymorphism give a real life example?