#define LEN 20
int main()
{
int fd1 = open("test.txt", O_RDONLY);
if (fd1 == -1)
{
perror("open1()");
exit(1);
}
char buf[20];
int r_len;
if ((r_len = read(fd1, buf, LEN)) < 0)
{
perror("read1()");
exit(1);
}
printf("%d %s\n", r_len, buf);
exit(0);
}