what is the difference between virtual function and
destoctor?
Answer / 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 |
for example A,B,C,D are class all the 4 class contain one method who() but the method who() implementaion is differnet among each class. the relation among the 4 class are A is base class and is inherited by B and C.and from this two B and C where D is inherited. the question is i want to display the output who() method in all the classes(A,B,C,D)the output of who() method is diferrent amond all the class(A,B,C,D) ------A------ virtuval who(print a) override | | who(print b) B C override who(print c) | | -------D------ override who(print d)
create a c++ program that will accepts 9 inputs using 3 by 3 array.
Program to print 0 to 9 in cross order
why overriding?
Explain virtual inheritance?
Write a C++ program without using any loop (if, for, while etc) to print prime numbers from 1 to 100 and 100 to 1 (Do not use 200 print statements!!!)
What is coupling in oop?
WHAT IS THE DIFFERENCE BETWEEN OBJECT BASED & OBJECT ORIENTD PROGRAMMING LANGUAGE.(GIVE AT LIST 4 PIONT)
Does c++ support multilevel and multiple inheritance?
Can a varargs method be overloaded?
what is the difference between function template and template of function?explain with example.
what uses of c++ language?