橘子味的心
标题:C库宏 NULL()

C库宏 NULL()

#include <stddef.h>

#include <stdio.h>



int main () {

   FILE *fp;



   fp = fopen("file.txt", "r");

   if( fp != NULL ) {

      printf("Opend file file.txt successfully\n");

      fclose(fp);

   }



   fp = fopen("nofile.txt", "r");

   if( fp == NULL ) {

      printf("Could not open file nofile.txt\n");

   }



   return(0);

}

目录

分类