Chapter 10 Flashcards
1
Q
What are 2 forms of copy constructor
A
- Deep copy
- Shallow copy
2
Q
How can we return an object
A
With ‘this’ pointer like this (by dereferencing ‘this’ pointer).
return *this;
3
Q
What are 2 representations of complex number
A
- Euler form
- Phasor form
4
Q
What are advantages of separation of concern
A
user is isolated against any change in the code
5
Q
What are constant member functions
A
With its use, the values of member functions can not be changed.
6
Q
Can constructor and destructor be constant
A
No
7
Q
Can constant member function call non-constant member function
A
No
8
Q
is this pointer a constant pointer
A
Yes