Knowledge in This pointer variable

Program to explain pointer variable 'this'.

The 'This' pointer variable is used to point the current object of a class in simple words. The this pointer variable is also used to return the reference of the current object of a class so that we can chain the function calls. This results in the chaining of a function calls at one go. There are many advantages of this pointer variable.