r------------------------------- CST8165 Lab Attendance Exercise #87 - Week 7 ------------------------------- -Ian! D. Allen - idallen@idallen.ca - www.idallen.com This quick exercise is to register your attendance in this lab this week. Submit: cstsubmit 87 attendance.txt The answers to these are in the beginning of Lab 4. 1a. Give the syntax to make printf() output no more than 9 bytes from a string. 1b. Give the syntax to make printf() output no more than "numread" bytes from a string, where "numread" is a variable. 2. Rewrite this to remove the redundant buffer size constant: char buf[256]; ... read(fd,buf,256); 3a. What function replaces recv() for non-socket descriptors? 3b. What function replaces send() for non-socket descriptors? 4. How can you safely use [f]printf() in front of a call to perror()?