title: How to check for new lines and carriage returns in C
body: <p>So I'm trying to figure out why the following C code doesn't work:</p>
  
  <pre><code>int isBlank(char *s){
      for(;*s != '\0';s++){
          if(*s != '\n' || *s != '\r'){
              return 0;
          }
      }
      return 1;
  }
  </code></pre>
  
  <p>The idea is that it should return 0 if it hits anything BUT a \n or \r character otherwise it will return 1. But it seems to return 0  for almost any line? I'm sure there is something really stupid I'm missing here. :(</p>