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                      
tip   SiteMap shows list of All Categories in this site.
Google
 
Categories  >>  Software  >>  Programming Languages  >>  C++  >>  STL
 
 


 

 
 STL interview questions  STL Interview Questions
 OOPS interview questions  OOPS Interview Questions
 C++ General interview questions  C++ General Interview Questions
Question
What is Constructor
 Question Submitted By :: B4urhtdm
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What is Constructor
Answer
# 1
IT IS A MEMBER FUNCTION WHOSE TASK IS TO INITIALIZE THE 
OBJECTS OF ITS CLAASS.
IT IS INVOKED A SOON AS THE  OBJECT ASSOCIATED WITH THAT 
CLASS IS CREATED.
ITS TYPES:-
1> COPY CONSTRUCTOR
2>
PARAMITERISED CONSTRUCTOR
3>
DUMMY CONSTRUCTOR
4>
DYNAMIC CONSTRUCTOR
 
Is This Answer Correct ?    4 Yes 0 No
Shalini Chopra
 
  Re: What is Constructor
Answer
# 2
Constructor is a default member function available with a 
class.

It can be explicitly defined in a class to initialize the 
variables.

Constructor is called when an object is created for a class.

Rules for defining a constructor
********************************

The name of the constructor should possess the same name of 
the class.

The constructor member function should not return a value.
 
Is This Answer Correct ?    4 Yes 1 No
M.shanmuga Sundaram
 
 
 

 
 
 
Other STL Interview Questions
 
  Question Asked @ Answers
 
what is a template? BITS2
what is use of for loop? Wipro7
What is the disadvantage of templates ? Symphony2
What is 2*2?  3
Define the terms: field, record, table and database  1
How Find, Replace and Go To commands ca be used to substitute one character string for another? Explain with the heIp of an example.  1
Find the error in the following program struct point {struct point *next; int data; } x; main() {int...data; } x; main() {int i; for(x=p;x!=0;) x=x->next,x++; freelist(x); } freelist(x) {free(x); return } Sun-Microsystems1
how to overload << and >> operator in c++ Wipro3
In what cases using of a 'template' is a better approach then using of a 'base class'? Lucent6
What is the underlying datastructure of map? Siemens4
Give the output of the following program main() {char *p='a'; int *i=100/*p; } what will be the value of *i= 1 Sun-Microsystems3
write a piece of c++ code which allocate memory to the 50 object of type CObj  2
Waht is inheritance  4
What is Constructor Angel-Broking2
What is Template Specialization? Lucent1
I am doing my BS.c MATHS CAN I ABLE TO JOIN IN NIIT?  1
How the STL's are implemented, What the difference between templates and STL? Symphony1
Assume I have a linked list contains all of the alphabets from "A" to "Z?" I want to find the letter "Q" in the list, how does you perform the search to find the "Q?"  2
c# support late binding or early binding.  3
What is the Difference between CArray and CList? Siemens1
 
For more STL 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