#include int main() { FILE* fp; fp = fopen(\"temp.txt\", \"w\"); fprintf(fp, \"Hello, World!\\n\"); // remove(\"temp.txt\"); this
No, you can't. And FILE struct doesn't include filename inside it. So best option is to have structure that will both hold pointer to FILE and to char* with name
FILE
char*