title: Is there a diffrence between time_t now=time(NULL); and time_t now; time(&now);?
body: <p>Both work correctly in my simple test code, but I'd like to know if there is any real difference, or any agreed upon preferences in coding styles.</p>
  
  <p>Sample code enclosed:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;time.h&gt;
  
  int main(int argc, char **argv)
  {
      time_t now1, now2;
      time(&amp;now1);
      now2 = time(NULL);
  
      printf("now1 = %ld\n", now1);
      printf("now2 = %ld\n", now2);
  
      return 0;
  }
  </code></pre>
  
  <p><strong>EDIT</strong><br>
  I just saw <a href="https://stackoverflow.com/a/9945669/3812704">Keith Thompson's answer</a> - This question should probably be marked as duplicate.</p>