Testing a file is available or not,
#include <stdio.h> int main() { FILE* fp; char c[16]; fp = fopen("file1.txt", "r"); // using write mode if (fp == NULL) printf("File not found!"); return 0; }
Last updated 1 year ago
Was this helpful?