top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

What is type of “this” pointer? Explain when it is get created?

+1 vote
77 views
What is type of “this” pointer? Explain when it is get created?
posted Jan 27, 2015 by Anwar

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+2 votes

The ‘this’ pointer is passed as a hidden argument to all nonstatic member function calls and is available as a local variable within the body of all nonstatic functions. ‘this’ pointer is a constant pointer that holds the memory address of the current object. ‘this’ pointer is not available in static member functions as static member functions can be called without any object (with class name).

It is a constant pointer type. It gets created when a non-static member function of a class is called.

answer Jan 28, 2015 by Mohammed Hussain
Similar Questions
+4 votes

What is the point of declaring Pointer of different types (eg. integer,float,char) as we all know pointer takes 4 bytes of space regardless which type of pointer it is and only contains address?

+4 votes

Lets assume I have a system with RAM of 1GB. and virtual memory is 500MB. That brings to 1.5GB i.e. 1500 MBytes.

I have read somewhere that when I process is created stack of 8MB is associated to that process. So, assuming that any of the process is not allocating any dynamic memory or anything, then does it mean that, Maximum number of process that i can create is 1500/8 and i.e. 187 Process.

Please clarify my understanding,

Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...