title: returning NULL from an integer function in c
body: <p>I am learning C, used to code in Ruby.
  So how do I return NULL from a integer result type function?
  for example:</p>
  
  <pre><code>int valueOf(t_node *node, int n){
      int current = 0;
      int value;
      while (node -&gt; next != NULL) {
          value = node -&gt; val;
          if (current == n) {
              return value;
          }
          if (current &gt; n) {
              return NULL;
          }
          node = node -&gt; next;
          current += 1;
      }
  }
  </code></pre>
  
  <p>I wanted function to return <code>NULL</code> if <code>current &gt; n</code> is <code>true</code>.</p>