Answered You can hire a professional tutor to get the answer.

QUESTION

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'

  1. What are contents of buf after does read (fd, 1, buf)?
  2. Then do read(fd, 1, buf). what is in buf?
  3. then do lseek(fd, 10 , SEEK_SET); read (fd, 1, buf). What is in buf?
  4. Then do fd2 = dup(fd); lseek(fd, 20, SEEK_SET); read (fd, 2, buf); What is in buf?
  5. Then do read(fd, 1, buf). What is in buf?
  6. Then do read(fd2, 2, buf). What is in buf?
  7. Then do fd3 = open("/foo.txt"); read(fd3, buf, 2);

*Just provide the characters as answer

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question