Esercizio 2 (da quanto ho capito):

codice:
#include <stdio.h>

int view (char *);

int main (void) {
        if (! (view ("pippo.txt")))
                fprintf (stderr, "Il file non è stato aperto, Mannaggia! \n");
        return (0);
}

int view (char * s) {
        char ch;
        FILE * fp;
        if ((fp = fopen (s, "r")) == NULL)
                return (0);
        while (! (feof (fp))) {
                ch = fgetc (fp);
                fprintf (stdout, "%d \t %X \n", ch, ch);
        }
        return (1);
}
Saluti