What is the use of 'this' pointer?



What is the use of 'this' pointer?..

Answer / Divya Gupta

'this' pointer is a pointer to the object that calls the function. It is used to access the non-static members of a class from within the member functions.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

Why do we use setw in c++?

1 Answers  


What is size of null class?

6 Answers   HP,


Why use of template is better than a base class?

1 Answers  


Which compiler does turbo c++ use?

1 Answers  


What is the use of this pointer in c++?

1 Answers  


Explain function overloading

1 Answers  


In what situations do you have to use initialization list rather than assignment in constructors?

1 Answers  


How many bit combinations are there in a byte?

13 Answers   Intel, Microsoft,


Give the difference between the type casting and automatic type conversion. Also tell a suitable C++ code to illustrate both.

1 Answers   TCS,


Explain public, protected, private in c++?

1 Answers  


What are stacks?

1 Answers  


Types of storage and scope of each type

2 Answers   CA,


Categories