views:

66

answers:

0

Possible Duplicate:
What is the rationale for fread/fwrite taking size and count as arguments?

In C, fwrite and fread take both the number of elements to write and the size of each element. It seems like just having a parameter that tells the number of bytes that should be written would more obvious and more general because the number of bytes to write is simply equal to elements times size. Is there an good reason for the design of these functions, or is the reason lost in antiquity?