i have to write a parser that replaces text in a file, can find several tokens and so on. now my question: there are several ways to access a file, i could use fgetc and work with singele chars (the direct and "easy" way, or i can use functions that read a lot of data and place the #read bytes in a bufer (and tehn work on the buffer). i'll make an exmple to make clear what i mean (if it isn't yet): for copying a file i can fputc(fgetc(f)), or i could fgets some bytes, store them in a bufer and the put them.
which way is fster (because disk operations are slow). is fgets or fgetc faster?