title: Memory alloc failure handling in void function
body: <p>I just wanted to know the way of handling the memory allocation failure in void function</p>
  
  <p>e.g:-</p>
  
  <pre><code>    void func()
      {
        struct stack *p;
        p = malloc(sizeof(struct stack));
        if(p == NULL)
        {
          /*here is where my confusion is,I cant return as the function is of 
  type void, and I have to do the mem check compulsorily. */
  
        }
  
      }
  </code></pre>