when i try to open the file i get a seg fault always. any help is appreciated.
Code:void open_batch() { char f[100]; char c; int a = 0, b = 0; int eof = 0; int d, e, g, h, i, j, k; printf("Please enter the file you wish to run: "); scanf("%s", f); if((fopen(f,"rt") == NULL)) { printf("No such file"); } else { printf("File exists"); } while(eof == 0) { c = fgetc(file); ... ...