Hello zizi21,
It may not be significantly sloerw but it is not going to be faster.
I/O operations are typically buffered. So even though you fetch a char, system would fetch an entire disk block. Further requests would be satisfied from this block. So the extra time spent would be in calls and not I/O.
This is implementation dependent and not standard but should be fairly common behavior.
Regards,
sunnycoder
Main Topics
Browse All Topics





by: Infinity08Posted on 2008-07-16 at 02:56:55ID: 22014486
It's equivalent. Usually, getc is even implemented as a macro that uses fgetc.