练习:FILE*file指针;fopen的用法

#include<stdio.h>
int main(void)
{
 FILE*file;
 file = fopen("C:\\test","r");
 if(!file){ //等效于:file ==NULL
  printf("打开文件成功!");
 }else{
  printf("打开文件失败!");
 }
 return 0;
 
}
 
打开方式:
 
posted @ 2019-01-24 15:07  指遥  阅读(2201)  评论(0)    收藏  举报