Untitled
#include<stdio.h> #include<stdlib.h> #include<unistd.h> int main(void){ int fd[2]; pipe(fd); char *buff = "Przemek"; char *buff2 = malloc(sizeof(&buff)); write(fd[1], buff, 11); close(fd[1]); printf("Buff nr 1: %s\n",buff); printf("Buff nr 2: %s\n",buff2); read(fd[0],buff2,11); close(fd[0]); printf("Buff nr 1: %s\n",buff); printf("Buff nr 2: %s\n",buff2); return 0; }