what is the difference between class to class type
conversion and copy constructor ?
Answers were Sorted based on User's Feedback
Answer / sujatha
CLASS TYPE TO CLASS TYPE:
In class to class type this can be achieved through either
by using TYPE CONVERSIONS OR BY USING CONSTRUCTORS.
here one class object is convrted into another class object
COPY CONSTRuctor:
here we r copying already existing object value to new
object of the same type.
and copy constructor will get called when we are creating
new object of the class at the same time we r intializing
the object with the already existing object.
ex:
A a1; //a1 is object of class A
A a2=a1 //a2 object of class A. a2 is a new object and a1
//is already existing object.
| Is This Answer Correct ? | 8 Yes | 0 No |
Answer / ganesh
this copy constructor is coping already existing object
values of same type
| Is This Answer Correct ? | 1 Yes | 1 No |
What is encapsulation selenium?
What is virtual destructor? Why?
3 Answers Agile Software, College School Exams Tests, CSC,
What are the advantages of polymorphism?
What is data binding in oops?
What is multilevel inheritance?
What does and I oop mean in text?
How do you answer polymorphism?
What does no cap mean?
what's the basic's in dot net
Finding of the 4 larger (bigger) numbers from the list like{1245,4587,2145,1163,29987,65783.....}
write a function that takes an integer array as an input and finds the largest number in the array. You can not sort array or use any API or searching needs?
2 Answers IBMS, Zycus Infotech,
define oops concept with example