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


Please Help Members By Posting Answers For Below Questions

What is oops concept with example?

578


String = "C++ is an object oriented programming language.An imp feature of oops is classes and objects".Write a pgm to count the repeated words from this scenario?

1944


write a program to enter a string like"sunil is a good boy and seeking for a job" not more than 10 characters including space in one line,rest characters should b in other line.if the next line starts from in between the previous word,then print whole word to next line.

1793


2. Give the different notations for the class.\

1590


What is the difference between a mixin and inheritance?

522






Advantage and disadvantage of routing in telecom sector

786


Are polymorphisms mutations?

703


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?

1395


what are the different types of qualifier in java?

1842


Can enum be null?

587


What is a superclass in oop?

669


just right the logic of it 1--> If few people are electing then every time ur candidate should win 2--> arrange books in box, if box carry weight == books weight then take another box..... find the no of box required.

6485


If a=5, b=6, c=7, b+=a%c*2. What is the final value of b?

944


Which language is not a true object oriented programming language?

642


Why multiple inheritance is not allowed?

584