ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
Google
 
Categories  >>  Software  >>  Programming Languages  >>  C++  >>  OOPS
 
 


 

 
 STL interview questions  STL Interview Questions
 OOPS interview questions  OOPS Interview Questions
 C++ General interview questions  C++ General Interview Questions
Question
What is virtual constructors/destructors?
 Question Submitted By :: Tribhuvan Sharma
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What is virtual constructors/destructors?
Answer
# 1
virtual constructors are used when we need to avoid the 
copy same. desructor frees the memory with a ~(tilde) symbol
 
Is This Answer Correct ?    0 Yes 1 No
Khadeer.k
 
  Re: What is virtual constructors/destructors?
Answer
# 2
there is no virtual constructor..coz..virtual thing is in 
run time n constructor ic compile time thing.
 
Is This Answer Correct ?    1 Yes 0 No
Debasish
 
 
 
  Re: What is virtual constructors/destructors?
Answer
# 3
There is nothing like virtual constructors but we can have 
virtual destructors so that the destructor of the correct 
object is called.
Ex.

Base *bptr = new derived()

delete bptr; then the destructor of the derived objetc is 
called when the base destructor is marked as virtual.

else destructore of base class is called and may lead to 
memory leak if we have allocated any new memory.
 
Is This Answer Correct ?    0 Yes 0 No
Nk
 

 
 
 
Other OOPS Interview Questions
 
  Question Asked @ Answers
 
WILL I GET A guaranteed JOB AFTER DOING bsc()IT) and GNIIT from an NIIT CENTRE?? Biocon1
to remove the repeated numbers from the given . i.e.., if the input is 12233 output should of 123  1
Should you protect the global data in threads? Why or why not? IBM1
tell about copy constructor Siemens1
What is Method overloading?  4
What is abstraction?  6
What do you mean by public, private, protected and friendly?  1
In what situation factory design patterns,DAO design patterns,singleton design patterns should be applied.?  1
How is exception handling carried out in c++?  1
can you explain how to use JavaBean in Project Infosys1
what is multithreading in c++ , what is difference between multithreading and singlethreading.  1
how to create thread in java? Infosys10
How is data security provided in Object Oriented languages? ?  3
What is Object and Class? What are the differences between them?  3
When is a memory allocated to a class?  3
In which cases you use override and new base?  1
What is an orthogonal base class?  1
In the following declaration of main, "int main(int argc, char *argv[])", to what does argv[0] usually correspond? 1) The first argument passed into the program 2) The program name 3) You can't define main like that  4
what is the difference b/w abstract and interface? Merrill-Lynch1
i ahve v low % in 12th n BSC which is aroun 50 coz science was imposed on me......nw m doin MCA n my aggregate in above 74%,what shud i say if asked about low previous percentage??????  3
 
For more OOPS Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com