Hey how would I be able to output the first 10 words of the text file without using functions from <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
int main()
{
int fd_to_read = open("sample.txt", O_RDONLY);
if (fd_to_read == -1) {
exit(1);
}
// ...
close(fd_to_read);
}
I have no idea how to display the first 10 words without the use of <stdio.h>