#include<stdio.h>
#include<errno.h>
#include<string.h>
int main()
{
FILE * fp;
fp = fopen("GeeksForGeeks", "/root/C");
printf("Value of error no : %d\n", errno);
printf("The error message is : %s\n", strerror(errno));
perror("Message from perror.");
return 0;
}
Run Code Online (Sandbox Code Playgroud)
这是我的代码,但是当我删除“\n”时,perror 的执行顺序发生了变化。谁能解释为什么?