Answer Posted / manjusinga
A pure virtual function is a function that must be
overridden in a derived class and need not be defined. A
virtual function is declared to be "pure" using the
curious "=0"
syntax:
class Base {
public:
void f1(); // not virtual
virtual void f2(); // virtual, not pure
virtual void f3() = 0; // pure virtual
};
| Is This Answer Correct ? | 16 Yes | 0 No |
Post New Answer View All Answers
What is difference between data abstraction and encapsulation?
• What are the desirable attributes for memory managment?
What are two types of polymorphism?
Can an interface inherit a class?
Why is static class not inherited?
What is a class oop?
What is the importance of oop?
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?
What is balance factor?
Why do we use class in oops?
officer say me - i am offered to a smoking , then what can you say
if i have same function with same number of argument but defined in different files. Now i am adding these two files in a third file and calling this function . which will get called and wht decide the precedence?
write a C++ program for booking using constructor and destructor.
What does oop mean in snapchat?
Why can't we have instance(stack) of a class as a member of the same class like eg.Class A{A obj;} as we can have self refential pointer