#include /*include the standard input output definitions*/ #define OK_NO_PROBLEMS 0 /*this is NOT an instruction - it just says the C pre-processor that OK_NO_PROBLEMS is an alias to zero (0)*/ int hello (FILE *fwhere2print, char *what2print){ int return_value=0; return_value=fprintf (fwhere2print, "%s", what2print); if (return_value<0) return return_value; /*we had a problem - fprintf returns a negative number if a problem occurs*/ else return OK_NO_PROBLEMS; }; int main (int number_of_arguments, char *argument_values[]){ int f=0, return_value=0; printf ("This program was called with %d arguments\n", number_of_arguments); for (f=0;f=OK_NO_PROBLEMS) printf ("Program terminates with return code = %d\n",return_value); else printf ("Oooopsss... there was some problem and the program terminates with an error (return code = %d)\n",return_value); };