i have got a little idea about this code… but i am not clear …can someone please explain this program to me ?? and that fread … isn’t that for reading a file??
First of all, you have the same link repeated, such that you seem to mention to different solutions that are actually the same one from the point of view from who reads the question!!!
Secondly, yes, fread is tailored to read files… But, it can be “overloaded” to read from the stdin if you specify it on the (FILE * stream) parameter… So you can actually perform relatively faster I/O operations if you take advantage of this…
thanks bruno, i have edited my post… now both links are different…thanks for your reply… and you got my doubt … check out the 2nd link and let me know if you can tell something else about that code…