#include <fcntl.h>
#include <unistd.h>

main()
{
  int fd;
  ssize_t nread;
  char buf[1024];

  /* open file "data" for reading */
  fd = open("data", O_RDONLY);

  /* read in the data */
  nread = read(fd, buf, 1024);

  /* close the file */
  close(fd);

}

