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 solid in oops?
Explain the advantages of inheritance.
What is abstraction in oop?
What is polymorphism oop?
what type of question are asked in thoughtworks pair programming round ?
Why is encapsulation used?
Who invented oop?
What is the difference between a constructor and a destructor?
What is polymorphism and its types?
What is constructor in oop?
Why do we use oop?
when to use 'mutable' keyword and when to use 'const cast' in c++
What is encapsulation selenium?
Question: Write a program that prints a paycheck. Ask the program user for the name of the employee, the hourly rate, and the number of hours worked. If the number of hours exceeds 40, the employee is paid “time and a half”, that is, 150 percent of the hourly rate on the hours exceeding 40. Be sure to use stepwi se refine ment and break your solution into several functions. Use the int_name function to print the dollar amount of the check.
Write A Program to find the ambiguities in Multiple Inheritance? How are they resolved.(Virtual Functions)