title: It always prompts "code will never be executed"
body: <p>Here is my C++ code:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main ()
  {
      int n, ip1, ip2, ip3, ip4, port;
      unsigned ip;
      char str [80];
      printf ("Enter IPv4 address: ");
      scanf ("%79s",str);
  
      n = sscanf(str, "%3d.%3d.%3d.%3d:%5d", &amp;ip1, &amp;ip2, &amp;ip3, &amp;ip4, &amp;port);
      printf ("Content length is %d\r\n", n);
      if (n != 4 || n != 5) {
          ip = 0;
          port = 161;
      }
      else if (n==4) {
          port = 161;
      }
      ip =(ip1 &lt;&lt; 24) + (ip2 &lt;&lt; 16) + (ip3 &lt;&lt; 8) + ip4;
      printf ("ip addr is %d , port is %d \r\n", ip, port);
  }
  </code></pre>
  
  <p>But xcode alway prompts me:</p>
  
  <pre><code>else if (n==4) 
  </code></pre>
  
  <p>will never be executed, and indeed happened.
  How the conditions should be?</p>