如何查看文件的创建位置并打开它?
#include <stdio.h>
int main ()
{
FILE * pFile;
char sentence [256];
printf ("Enter sentence to append: ");
fgets (sentence,255,stdin);
pFile = fopen ("mylog.txt","w");
fputs (sentence,pFile);
fclose (pFile);
return 0;
}
最佳答案
该文件将在您当前的工作目录中创建。
关于c - 这样创建的文件放在哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8377725/