题目:fopen: r r+ w w+ a a+ 要求写出open函数对应打开方式的组合;
答案:r:O_RDONLY
r+:O_RDWR
w:O_WRONLY|O_CREAT|O_TRUNC
w+:O_RDWR|O_CREAT|O_TRUNC
a:O_WRONLY|O_CREAT|O_APPEND
a+:O_RDWR|O_CREAT|O_APPEND
题目:fopen: r r+ w w+ a a+ 要求写出open函数对应打开方式的组合;
答案:r:O_RDONLY
r+:O_RDWR
w:O_WRONLY|O_CREAT|O_TRUNC
w+:O_RDWR|O_CREAT|O_TRUNC
a:O_WRONLY|O_CREAT|O_APPEND
a+:O_RDWR|O_CREAT|O_APPEND