adplus-dvertising
frame-decoration

Question

What is the purpose of the this pointer in a class?

a.

It is used to access data members of the class

b.

It is used to access methods of the class

c.

It is used to pass a pointer to an instance of the class to a method

d.

It is used to distinguish a class from a regular data structure

Posted under Reverse Engineering

Answer: (c).It is used to pass a pointer to an instance of the class to a method Explanation:The this pointer is used to pass a pointer to an instance of the class to a method.

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the purpose of the this pointer in a class?