Interview Questions Answers.ORG
Interviewer And Interviewee Guide
Interviews
Quizzes
Home
Quizzes
Interviews C Plus Plus Language Interviews:C++ Access ControlC++ COM ActiveXC++ ConstructorsC++ ContainersC++ Exception HandlingC++ FriendC++ InheritanceC++ Inline FunctionC++ New And DeleteC++ Operator OverloadingC++ Pointers & FunctionsC++ ProgrammerC++ ReferencesC++ Static DataC++ SyntaxC++ TemplateC++ Type CheckingC++ Virtual Functions
Copyright © 2018. All Rights Reserved
C++ Constructors Interview Question:
Can you please explain the difference between copy constructor and an assignment operator?
Submitted by: AdministratorA copy constructor is used to declare and initialize an object from another object.
E.g: integer I2(I1);
An assignment operator doesnot invoke the copy constructor. It simply assigns the values of an object to another, member by member.
Submitted by: Administrator
E.g: integer I2(I1);
An assignment operator doesnot invoke the copy constructor. It simply assigns the values of an object to another, member by member.
Submitted by: Administrator
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.
https://InterviewQuestionsAnswers.ORG.