Analyse the following C program and predict its output. int main() {
Analyse the following C program and predict its output.
#include <stdio.h>
int main() {
FILE *fp;
if ((fp = fopen("temp.txt", "r")) == NULL)
printf("Error");
else
fclose(fp);
fclose(fp);
return 0;
}
Show answerHide answer
Correct answer: (D) Undefined behavior