69,382
社区成员
发帖
与我相关
我的任务
分享
buf[0] = 'a';
buf[1] = 10;
buf[2] = 'b';
int f = open("a.txt",O_WRONLY | O_CREAT);
write(f,buf,3);
close(f);
char buf[] = "ok\nfe\nfe\nee";
int f = open("a.txt");
write(f,buf,strlen(buf));
close(f);