CoolInterview.com - World's Largest Collection of Interview Questions & Answers, FAQs, queries, sample papers, exam papers, dumps, what, why, how, where, when questions
Interview Success Kit - 9,000 Interview Que. & Ans.
Covers 9,000+ Interview Questions asked in actual MNC Interviews - all with model answers.
Get Your Dream Job Now - www.vyoms.com
Sponsored Links
Interview Questions
Our Services

INTERVIEW QUESTIONS LANGUAGES C++ DETAILS
Question :
You?re given a simple code for the class BankCustomer. Write the following functions ...

You?re given a simple code for the class BankCustomer. Write the following functions:
* Copy constructor
* = operator overload
* == operator overload
* + operator overload (customers? balances should be added up, as an example of joint account between husband and wife)


Category C++ Interview Questions
Rating (2.7) By 6 users
Added on 7/16/2015
Views 26
Rate it!
Answers:


Note:Anyone confusing assignment and equality operators should be dismissed from the interview. The applicant might make a mistake of passing by value, not by reference. The candidate might also want to return a pointer, not a new object, from the addition operator. Slightly hint that you?d like the value to be changed outside the function, too, in the first case. Ask him whether the statement customer3 = customer1 + customer2 would work in the second case.



If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-

  • There should not be any Spelling Mistakes.
  • There should not be any Gramatical Errors.
  • Answers must not contain any bad words.
  • Answers should not be the repeat of same answer, already approved.
  • Answer should be complete in itself.
  • Name :*
    Email Id :*
    Answer :*
    Verification Code Code Image - Please contact webmaster if you have problems seeing this image code Not readable? Load New Code
    Process Verification Enter the above shown code: *
    Inform me about updated answers to this question

    Related Questions
    View Answer
    What are the defining traits of an object-oriented language?
    View Answer
    Why are arrays usually processed with for loop?

    View Answer
    Assignment Operator - What is the diffrence between a "assignment operator" and a "copy constructor"?


    View Answer
    mutable" Keyword - What is "mutable"?

    View Answer
    Which recursive sorting technique always makes recursive calls to sort subarrays that are about half size of the original array?

    View Answer
    Suppose that data is an array of 1000 integers. Write a single function call that will sort the 100 elements data [222] through data [321].

    View Answer
    What are 2 ways of exporting a function from a DLL?
    View Answer
    What is the word you will use when defining a function in base class to allow this function to be a polimorphic function?

    View Answer
    Explain term POLIMORPHISM and give an example using eg. SHAPE object: If I have a base class SHAPE, how would I define DRAW methods for two objects CIRCLE and SQUARE

    .
    View Answer
    ell how to check whether a linked list is circular.
    View Answer
    Write a function that swaps the values of two integers, using int* as the argument type.

    View Answer
    Write a short code using C++ to print out all odd number from 1 to 100 using a for loop


    View Answer
    Write a program that ask for user input from 5 to 9 then calculate the average
    View Answer
    In the derived class, which data member of the base class are visible?

    View Answer
    STL Containers - What are the types of STL containers?
    View Answer
    How do you traverse a Btree in Backward in-order?
    View Answer
    What is pure virtual function?

    View Answer
    How can you tell what shell you are running on UNIX system?
    View Answer
    How do you find out if a linked-list has an end? (i.e. the list is not a cycle)
    View Answer
    What is polymorphism?
    View Answer

    Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.

    View ALL C++ Interview Questions & Answers

    User Options
    Latest 20 Questions
    What are monomorphic and polymorphic classes?
    Why is Standard Template Library used?
    How should runtime errors be handled in C++?
    What do you mean by internal linking and external linking in c++?
    What is implicit conversion/coercion in c++?
    What is difference between shallow copy and deep copy? Which is default?
    What is virtual destructors? Why they are used?
    What do you mean by C++ access specifiers ?
    What are the advantages of operator overloading?
    What are the advantages of using cin and cout compared to scanf(...) and printf(...), respectively?
    What are static members and static functions?
    What are storage qualifiers in C++ ?
    What is the use of default constructor?
    What are tokens in C++?
    Define destuctors ?
    What is the difference between a template class and class template?
    What are the differences between new and malloc ?
    What is difference between template and macro ?
    What do you mean by early binding?
    How can we access protected and private members of a class?


    Copyright ©2003-2016 CoolInterview.com, All Rights Reserved.
    Privacy Policy | Terms and Conditions

    Download Yahoo Messenger | Placement Papers| FREE SMS | ASP .Net Tutorial | Web Hosting | Dedicated Servers | C Interview Questions & Answers

    Testing Articles | Testing Books | Testing Certifications | Testing FAQs | Testing Downloads | Testing Interview Questions | Testing Jobs | Testing Training Institutes


    Cache = 0.015625 Seconds