Print file (of any length) character by character in C -


Is there a way to describe a whole file, is described on the basis of character, its length or not Concerned about lines?

Now I read a file and count how many lines it contains, read each row, send a function to manipulate, print the manipulated string. To do this, I had to make a counterline () function and a readline () function. Just wondering whether something is more efficient

should do something like this:

  int ch = 0; While (ch = fgetc (FILE_POINTER)! = EOF) {doSomething (ch); }  

Comments