On Aug 3, 8:42 am, Raj N wrote:
> 1) Can a constructor call another constructor to initialize the same
> object?
Answer: Yes.
> 2) Can a struct variable be assigned to another if the structure
> contains an array as a field?
Answer: Yes.
> 3) Can we pass a private member by reference to a non
1) Yes ofcourse
2) yes you can
3) yes ofcourse
4) yes
5) i dont think . May we our default constructor def not matching ;)
On Aug 3, 8:42 pm, Raj N wrote:
> 1) Can a constructor call another constructor to initialize the same
> object?
> 2) Can a struct variable be assigned to another if the stru
Can a struct variable be assigned to another if the structure
contains an array as a field? You can. But it will be like a shallow copy.
if the structure has a pointer variables those memory need to be assigned
explicitly.
3) Can we pass a private member by reference to a non member function?
No
1) A constructor can call another constructor but not for the same
object if we are talking just the precise meaning
of object and not considering the raw storage as Objects.
4) Destructor can be called explicitly .This is generally used when u
have used your own new operator so that objects