title: C read file in byte chunks
body: <p>Could not find proper documentation on this but I am trying to read a file using *nix system call read(). And I want read the file in 1024 byte chunks. Not sure what I have below is correct or not:</p>
  
  <pre><code>while (read(fd, buffer+i, 1024) == 1){
              i++;
  }
  </code></pre>
  
  <p>Can someone please verify?</p>