Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <unistd.h>
- int main()
- {
- char *buf = NULL;
- int len = 10;
- len = read(STDIN_FILENO, buf, 40);
- if (len > 0) {
- printf("%d", len);
- printf("\ngot %d bytes", len);
- return 0;
- }
- else if (len <= 0)
- {
- printf("%d", len);
- printf("\nFalse or got EOF");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement