title: Can we call a member function of a class without allocating memory?
body: <p>I have tried this:</p>
  
  <pre><code>class A{
      void fun()
      {
          cout&lt;&lt;"Hello World";
      }
  };
  
  int main()
  {
      A* obj;
      obj-&gt;fun();
  }
  </code></pre>
  
  <p>It prints "Hello World". but I havent allocated any memory. </p>