Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <assert.h>
- #include <sys/stat.h>
- size_t fsize(const char *pn) {
- struct stat statbuf;
- assert(!stat(pn, &statbuf));
- return statbuf.st_size;
- }
- int main() {
- printf("%I64u\n", fsize("fsize.c"));
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement