How to construct virtual constructor

Answer Posted / richa

Constructors can't be virtual in C++.It is an error.The
destructors on the other hand can be virtual.

Is This Answer Correct ?    29 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you be able to identify between straight- through and cross- over cable wiring? And in what case do you use straight- through and cross-over?

707


Explain rethrowing exceptions with an example?

685


What is a memory leak c++?

668


Why do we use setw in c++?

757


Explain the operation of overloading of an assignment operator.

786






What is low level language in simple words?

641


Write a C++ Program to check whether a number is prime number or not?

722


What is polymorphism in c++? Explain with an example?

688


Can I learn c++ without c?

755


Why do we use structure in c++?

663


Write a recursive program to calculate factorial in c++.

705


Write a program in C++ for Fibonacci series

756


What is a tree in c++?

635


Must accepts "Maestro Cards" Tax for bike should be less than 15 Total number of lanes is more than 10 Must provides monthly pass Write a method: boolean isGoodTollBridge(String[] cardsAccepted, String[] tollTax, boolean hasMonthlyPass, int numberOfLanes); String[] cardsAccepted A String array of names of card types accepted for payment of toll tax, it can be null if the toll does not accept any card String[] tollTax A String array of toll tax chart (say “Train : 300”,”BullCart : 10”) boolean hasMonthlyPass This parameter defines whether there is any monthly pass available or not int numberOfLanes This parameter defines the number of lanes for each side

3131


Comment on local and global scope of a variable.

671