1.

Why this pointer is used?(a) To access the members of a class which have the same name as local variables in that scope(b) To access all the data stored under that class(c) To access objects of other class(d) To access objects of other variablesI had been asked this question in examination.My query is from C++ Concepts topic in chapter Basics Concepts of C++ of C++

Answer»

Correct OPTION is (a) To access the members of a class which have the same NAME as local variables in that scope

Best explanation: this POINTER is used to access the members of a class which have the same name as local variables in that part of the CODE.



Discussion

No Comment Found

Related InterviewSolutions