When will a constructor executed?
Answers were Sorted based on User's Feedback
Answer / preeti
Constructor execution is depend on its type like,
1) inbuilt or default construtor, no parameter constructor
are executes whenever object creates.
2) parameterized constructor execute whenever it calls.
3) base class constructor execute before than child class
constructor(child class is derived from base class
constructor).
| Is This Answer Correct ? | 21 Yes | 1 No |
Answer / rahul
When an object create means suddenly construtor get executed
| Is This Answer Correct ? | 22 Yes | 3 No |
Answer / priya
Constructor gets called when we create an object,or when we
allocated memory using new operator:
void main()
{
test *t = new test;
delete t;
}
| Is This Answer Correct ? | 13 Yes | 0 No |
Answer / poorna chandar rao
when ever object is created automatically (conncurently
)construcor also executed
| Is This Answer Correct ? | 6 Yes | 1 No |
Is following functions are said to be overloaded? int add(int a,int b) char *add(int a,int b)
WHAT'S THE OOPS BASIC OOPS CONCEPTS IN DOTNET
char* ptr = "Rahul"; *ptr++; printf("%s",ptr); What will be the output
Prepare me a program for the animation of train
How to calculate the age from the date of birth by using the program?
advantage and disadvantage in c++>>oops and what are the questions ask for interview in c++>>oops. could you tell me or reply me
What is abstraction with example?
In what situation factory design patterns,DAO design patterns,singleton design patterns should be applied.?
can you give real time example for polymarphism
20% of a 6 litre solution and 60% of 4 litre solution are mixed what the % of mixture of solution it is resulted into?
What is destructor example?
Tell me the scenario,Where we can use interfaces or Abstract class.And What is the difference between interfaces and abstract class?