title: Which is the most efficient way in C to check that at least one of two integers is zero?
body: <p>I have code that is doing a lot of these comparison operations. I was wondering which is the most efficient one to use. Is it likely that the compiler will correct it if I intentionally choose the "wrong" one?</p>
  
  <pre><code>int a, b;
  // Assign a value to a and b.
  
  // Now check whether either is zero.
  
  // The worst?
  if (a * b == 0)       // ...
  // The best?
  if (a &amp; b == 0)       // ...
  // The most obvious?
  if (a == 0 || b == 0) // ...
  </code></pre>
  
  <p>Other ideas?</p>