title: Can we print the address of object of class in C++?
body: <p>How can we Print the address of object of class in the member function of that class in C++? </p>
  
  <pre><code>class A
  {
       int x;
     private:
       A(){x=2;}
  }
  int main()
  {
     A B;
     return 0;
  }
  </code></pre>
  
  <p>How to print the address of B in member function or in main().</p>