while((ch[0] = fgetc(fp))!=EOF) { if(ch=="F") { p=n;//p holds the lenght of the start of the word "Free" in each line in the file } if(ch=="\n") { n++;//n holds the value for length of each line in the file rewind(fp); break; } n++; } rewind(fp);//go back to the beginning of the file//counting the total number of lines in the file(number of license numbers stored) while((ch[0] = fgetc(fp))!=EOF) { if(ch=="\n") { totalcmbs++;//totalcmbs holds the total number of license numbers (lines) in the file } }
else if(a==2){ printf("How many Spaces between the first 3 letters and the remaining letter-number combination?- 1 is deafault \n"); scanf("%d",&d); if(c==3)}
else if(a==2){ printf("How many Spaces between the first 3 letters and the remaining letter-number combination?- 1 is deafault \n"); scanf("%d",&c); // <<<---------- NOTE I changed the 'd' to a 'c' if(c==3)}
Data
while (i <= totalcmbs)
while (i < totalcmbs)