#include < sys/uio.h > #include < stdio.h > int main() { ssize_t n; struct iovec vector[3]; vector[0].iov_base = "Hello"; vector[0].iov_len = 5; vector[1].iov_base = " "; vector[1].iov_len = 1; vector[2].iov_base = "World\n"; vector[2].iov_len = 6; if ((n = writev(1, vector, 3))< 0){ perror("writev"); return 1; } return 0; }