G**Y 发帖数: 33224 | 1 What "%[^\n]\n" means?!
If the first few lines of an input file are:
hello
hello
world
...
the 3rd line is empty, no extra spaces at the end of the lines. What the output should be?
#include
#include
int main(void) {
FILE* fp;
char file[999]="hello.world";
char dummy1[9999], dummy2[9999], dummy3[9999], dummy4[9999];
int line_max=9999;
int i;
if ((fp = fopen(file, "r")) == NULL) {
printf("Cannot open file %s for reading. \n", file);
exit( |
|