```
#include<stdio.h>
#include<ctype.h>

int main() {

    FILE *fpin = fopen("in.txt", "r");
    fprintf(fpin, "hello, world!");
    fclose (fpin);

    char c;
    fpin = fopen("in.txt", "r");
    FILE *fpout = fopen("out.txt", "w");
    while ((c = fgetc(fpin)) != EOF) {
        fputc (toupper(c), fpout);
    }

    fclose (fpout);
    fclose (fpin);
    return 0;
}

```

I am getting a

> 
> Segmentation fault
> 
> 
> 

Thank you.