Want a Free Job Posting?

Buy a job posting today and the second one is on us. For a limited time only. Act Now.

Interview Question

Interview San Jose, CA

The interviewer asked me to write C++ copy constructor and

  copy assignment constructor. One of the worst screen-sharing tool was provided. Wrote the code with usual mistakes of not checking NULL value of the pointer before allocating memory, but corrected the error. The interviewer looks like a copy-cat, arguing my code to check for copying same object in copy-assignment constructor. As per the interviewer we cannot compare 'this' pointer and '&arg' (arg was argument in copy-assignment constructor). I interviewer felt I am wrote some nonsense code without knowing C++ basics.I believe the interviewer wasn't familiar with C++ basics.

Add Answers or Comments

To comment on this, Sign In or Sign Up.