Answered You can hire a professional tutor to get the answer.
Suppose have an open file descriptor fd to file quot;/foo.txtquot; containing this data: 'abcdefghijklmnopqrstuvwxyz' What are contents of buf
Suppose have an open file descriptor fd to file "/foo.txt" containing this data:
'abcdefghijklmnopqrstuvwxyz'
- What are contents of buf after does read (fd, 1, buf)?
- Then do read(fd, 1, buf). what is in buf?
- then do lseek(fd, 10 , SEEK_SET); read (fd, 1, buf). What is in buf?
- Then do fd2 = dup(fd); lseek(fd, 20, SEEK_SET); read (fd, 2, buf); What is in buf?
- Then do read(fd, 1, buf). What is in buf?
- Then do read(fd2, 2, buf). What is in buf?
- Then do fd3 = open("/foo.txt"); read(fd3, buf, 2);
*Just provide the characters as answer