title: Checking the first letter of a string in c
body: <p>I am writing a very simple function in C to check if a string is an absolute path or relative path. No matter what I try it is always returning false.</p>
  
  <p>Here is what I have tried:</p>
  
  <pre><code>int isAbsolute(char *str){
      if(strcmp(str,"/")){
          return 1;
      }
      return 0;
  }
  </code></pre>
  
  <p>and I call it like:</p>
  
  <pre><code>printf("%d\n", isAbsolute("/"));
  </code></pre>
  
  <p>which is returning false every time. Clearly I am missing something obvious but I haven't been able to figure it out...</p>