Fread number of bytes limit
问题 Does fread have a limit for the number of bytes it can read at once? Or I can read any size I would like to charge in to my pointer? For example, Can I read file of 50MB once using fread to charge it into char pointer? 回答1: Theoretically, yes, it can read any number of bytes up to the maximum of size_t (which is an unsigned int (roughly 4GB on a 32-bit system). However, since your buffer will have to be allocated in a contiguous block, it is not likely to be feasible, nor advisable, to read