(c) [3 marks] Mehdi is writing C code that, when opening a file fails, prints the cause according to errno: FILE *f = if
Posted: Fri Jul 08, 2022 7:27 am
question.)
(c) [3 marks] Mehdi is writing C code that, when opening a file fails, prints the cause according to errno: FILE *f = if (f == fopen ("blabhlah", "w") ; NULL) { fprintf(stderr, "boom!\n"); fprintf(stderr, "fopen failed: %s\n", strerror(errno)); } else { } What mistake has Mehdi made? (Even though it may or may not actually break under all circumstances.) Also, suggest one way to rectify it. (No one was electrically shocked in the making of this