Mega Code Archive
Categories
/
C
/
Code Snippets
Terminate calling process how to use exit
#include
#include
int main () { FILE *file; file = open ("myfile.txt","r"); if (file==NULL) { printf ("Error opening file"); exit (1); } return 0; }