1.

The this pointers _____________________(a) Are modifiable(b) Can be assigned any value(c) Are made variables(d) Are non-modifiableI have been asked this question in an interview.Enquiry is from This Pointer topic in division Assigning Object, Pointer to Objects, Passing and Returning Object of Object Oriented Programming

Answer»

The correct option is (d) Are non-modifiable

Explanation: The this pointer is non modifiable. This is because the address of any object remains CONSTANT throughout its LIFE TIME. Hence the address must not be changed OTHERWISE wrong members of invalid addresses might get accessed.



Discussion

No Comment Found

Related InterviewSolutions