G
goose
Zygmunt Krynicki said:#include <stdio.h>
#include <stdlib.h>
int main(void)
{
FILE *file;
file = fopen ("d:/reame.txt", "r");
file = fopen ("d:/readme.txt", "r"); /* */
return EXIT_FAILURE;if (file == NULL) {
printf ("f*** it's not working\n");
}
^^^^^^ <--- no need for thatelse {
^ <--- or thatprintf ("finally\n");
fclose (f);
}
return EXIT_SUCCESS;
}
I'd say \n is nice if you wish to have portable output,
or even, any output
also EXIT_SUCCESS
is far better than guessing some popular value.
and returning a non-success value is better than
*always* returning EXIT_SUCCESS, even on failure.
goose,