title: How to compare strings in an "if" statement?
body: <p>I want to test and see if a variable of type "char" can compare with a regular string like "cheese" for a comparison like:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main()
  {
      char favoriteDairyProduct[30];
  
      scanf("%s",favoriteDairyProduct);
  
      if(favoriteDairyProduct == "cheese")
      {
          printf("You like cheese too!");
      }
      else
      {
          printf("I like cheese more.");
      }
  
      return 0;
  }
  </code></pre>
  
  <p>(What I actually want to do is much longer than this but this is the main part I'm stuck on.)
  So how would one compare two strings in C?</p>