what is the difference between virtual function and
destoctor?
Answer Posted / prabhakar
virtual function is just like a member function of a class.it is used to over loading mechanisam.it can be acesses by any object of either base class or derived class.
destructor is used to dellocate the memory of an object.it can call by using delete operator.
Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What does and I oop mean in text?
What is encapsulation example?
#include
What causes polymorphism?
What do you mean by variable?
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.
Can abstract class have normal methods?
What is oops?what is its use in software engineering?
What is a superclass in oop?
Is enum a class?
What is abstraction oop?
is there any choice in opting subjects like 4 out of 7
Whats oop mean?
Which method cannot be overridden?
Why is destructor used?