1. What do the copy constructor and assignment operator? What is different between the two? 2. What do the default copy constructor and assignment operator do? Struct MyClass { char* str; }; MyClass A = B; What will the above statement do internally? 3. Which is better tree, linked list or array for looking up dictionary? 4. What is the Big O notation for searching in binary tree? in linked list? in binary search tree? 5. An array with one million elements, how will you search an element if unsorted or sorted (both)? What will be the Big O notation for this.
Sigiloso
For 2, I answered, Uses malloc to allocate new memory to A's char* str, then copy the value from B's char* str to A's copy and explained this in detail. Others I think are pretty simple