title: What's the best way to compare two strings for equality in C?
body: <p>I have got two strings (string literals in that case), say</p>
  
  <pre><code>char *name        = "Fotis";
  char *second_name = "Fotis";
  </code></pre>
  
  <p>and I have two ways to compare them, which are both giving me an accurate result. The first one is with the equality operator (<code>==</code>), likewise:</p>
  
  <pre><code>if (name == second_name)
      printf ("Great success!\n");
  </code></pre>
  
  <p>and the second one is through the <code>strcmp</code> function available in <code>string.h</code>:</p>
  
  <pre><code>if (strcmp (name, second_name) == 0)
      printf ("Great success!\n");
  </code></pre>
  
  <p><strong>My question is:</strong> Which one of the two is the most {efficient | idiomatic} way to compare two strings in C? Is there another, more idiomatic way?</p>