C freopen descriptor - close manually/leave opened
问题 I've been using freopen (from stdio.h) function before without asking myself this question. But now I'm unsure. E.g. I've reopened stdout: #define OUTPUT_FILE "out.txt" if ( freopen(OUTPUT_FILE,"w+",stdout) == NULL) printf("logout can't be opened\n"); Usually every process has and handles stdout, stderr, stdin automatically and we needn't care about closing of them. But how is it to be here? I have reopened stdout. Should I call fclose for closing reopened stdout? PS I'd be gladder to look at