Consider the following C code:
void openFile(const char *mode, char *filename, FILE *fileptr) { ... fileptr = fopen(filename, mode); ... } FILE *logstream;