Sie sind auf Seite 1von 5

#include<stdio.h> #include<fcntl.h> void copy(int,int); int main() { int fd1,fd2; fd1=open("ops11.

c",0444); fd2=creat("xyz",0666); copy(fd1,fd2); close(fd1); close(fd2); return 0; } void copy(int fd1,int fd2) { char buff[25]; int n; while((n=read(fd1,buff,sizeof(buff))) >0) { write(fd2,buff,sizeof(buff)); } } ~ ~ "ops101.c" 22L, 311C written E138: Can't write viminfo file [NULL]! Hit ENTER or type command to continue -bash-2.05b$

Das könnte Ihnen auch gefallen