title: Why does my string comparison fail?
body: <p>Let's say I have the following code and output:</p>
  
  <pre><code>for (j = 0; j &lt;= i; j++) 
      printf("substring %d is %s\n", j, sub_str[j]);
  </code></pre>
  
  <p><strong>Output:</strong> </p>
  
  <pre>substring 0 is max_n=20
  substring 1 is max_m=20</pre>
  
  <p>Now I only want to print some substrings. However, if I try to do this conditionally:</p>
  
  <pre><code>for (j=0; j &lt;=i; j++) {
     if (sub_str[j] == "max_n=20") {
        printf("substring %d is %s\n", j, sub_str[j]);
     }
  }
  </code></pre>
  
  <p>I get no output at all. What's wrong with my code?</p>