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                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
Google
 
Categories  >>  Software  >>  Programming Languages  >>  C++  >>  C++ General
 
 


 

 
 STL interview questions  STL Interview Questions
 OOPS interview questions  OOPS Interview Questions
 C++ General interview questions  C++ General Interview Questions
Question
Can we have "Virtual Constructors"?
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Can we have "Virtual Constructors"?
Answer
# 1
there is nothing like "virtual constructor"
 
Is This Answer Correct ?    7 Yes 1 No
Shivangi
 
  Re: Can we have "Virtual Constructors"?
Answer
# 2
No, we cannot have virtual constructor. Because constructor
is usually use to create instance of a class and we cannot
make it virtual.
 
Is This Answer Correct ?    7 Yes 0 No
Rani
 
 
 
  Re: Can we have "Virtual Constructors"?
Answer
# 3
of course no such concept lie within C++ ,but we can achieve
this effect. Abstract Factory method show this type of effect.
 
Is This Answer Correct ?    1 Yes 2 No
Nishikant Sahu
 
  Re: Can we have "Virtual Constructors"?
Answer
# 4
Yes there is no virtual constructors.I can think a a reason 
may be because a constructor is never inherited so there is 
no polymorphism etc involved .
 
Is This Answer Correct ?    4 Yes 1 No
Vighnesh
 
  Re: Can we have "Virtual Constructors"?
Answer
# 5
No, we cannot have virtual constructor because at this time 
(during object creation or intialization) virtual table not 
yet created.
 
Is This Answer Correct ?    5 Yes 1 No
Vadivel
 

 
 
 
Other C++ General Interview Questions
 
  Question Asked @ Answers
 
what is static function Patni2
What is Memory Alignment? TCS1
What is difference between initialization and assignment? HP4
Why would you make a destructor virtual? Lehman-Brothers3
What is a "RTTI"? HCL5
Disadvantages of c++  3
this is to swap to strings....but in output the whole strings are swapped leaving first as it is...why it is so #include<iostream.h> int main() { char a[]="ajeet"; char b[]="singh"; long x=*a; long y=*b; cout<<x<<":"<<y; x=x+y; y=x-y; x=x-y; *a=x; *b=y; cout<<x<<":"<<y; cout<<&a<<endl; cout<<&b<<endl; }  1
Write a program to swap 2 chars without using a third varable? char *s = "A"; char *p = "B"; CTS3
Brief explaination about #include<iostream.h>, cin and cout  3
Can we generate a C++ source code from the binary file?  1
Give 2 examples of a code optimization?  1
What about Virtual Destructor? Virtusa1
What are the differences between a struct in C and in C++? Wipro4
Write any small program that will compile in "C" but not in "C++" Honeywell6
Implement strncpy  2
What are the basics of classifying different storage types, why? Symphony2
What is size of null class? HP3
What is a constructor initializer list and when we use constructor initializer list? TCS2
what is meaning of isa and hsa  1
Difference between static global and global? Symphony8
 
For more C++ General 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