title: Best practices to use assert and printf together
body: <p>I'm currently using the following statement to get <code>assert</code> and <code>printf</code> to work together, is there any better way to do this?</p>
  
  <pre><code>#define ASSERT(x) for(; !(x); assert(x))
  #define ALLOC_CHECK(x, ...) ASSERT(x) printf(__VA_ARGS__ "\n");
  ALLOC_CHECK(ptr != NULL, "Pointer not initialized");
  </code></pre>