/*
* main.c
*
* Created on: 2024-6-11
* Author: root
*/
#include
int main()
{
FILE *fp;
fp=fopen("/usr/include/gnu-versions.h","r");
if(fp!=NULL)
puts("open file succeed");
else
{
perror("dpen file");
return 1;
}
if(fclose(fp)!=-1)
puts("close file ");
else
{
perror("close fp");
return 1;
}
return 0;
}
运行
文章评论(0条评论)
登录后参与讨论