#include <iostream>
using namespace std;
struct wow {
int x;
};
int main() {
wow a;
wow *b;
a.x = 22;
b = &a;
a.x = 23;
cout << b->x;
return 0;
}
What is difference between abstraction and encapsulation?
What is data binding in oops?
why to use template classes in c++?
What is polymorphism ? Explain with examples
Is this job good for future? can do this job post grduate student?
What is the difference between Home and $Home?
What is the use of fflush(stdin) in c++?
what about you? wahat is your object? introduce your self?
1 Answers Ajmal Perfumes, TCS,
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 data binding?
What is multiple inheritance ?
17 Answers Blue Star, C DAC, CDAC, Impetus, Ness Technologies, Softvision Solution,
What is an orthogonal base class?