V

Vijay Sangwan • 28.62K Points
Instructor II

Q. What is the purpose of the 'this' pointer in C++?

  • (A) It points to the current object of a class.
  • (B) It is used to access global variables.
  • (C) It is used to define static functions.
  • (D) It is used for memory allocation.
  • Correct Answer - Option(A)
  • Views: 50
  • Filed under category C++

Explanation by: Vijay Sangwan
In C++, the 'this' pointer points to the current object of a class.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics