title: Using the equality operator == to compare two strings for equality in C
body: <pre><code>int main (int argc, **argv)
  {
         if (argv[1] == "-hello")
              printf("True\n");
         else
              printf("False\n");
  }
  </code></pre>
  
  <pre>
  # ./myProg -hello
  False
  </pre>
  
  <p>Why? I realize <code>strcmp(argv[1], "-hello") == 0</code> returns true... but why can't I use the equality operator to compare two C strings?</p>