Best practice is probably to take CommonTater's code, but instead of using your own BUFFERSIZE variable, use the BUFSIZ that's defined for you in stdio.h:
#define BUFSIZ 1024 /* size of...
Type: Posts; User: rags_to_riches
Best practice is probably to take CommonTater's code, but instead of using your own BUFFERSIZE variable, use the BUFSIZ that's defined for you in stdio.h:
#define BUFSIZ 1024 /* size of...
Actually, I do not believe that's correct, because calloc allocates an array of n elements of x bytes each -- and an array is guaranteed to be contiguous in memory -- reversing the order of the...