From 00974c325bfdb24c6027a87ce391cfda0ab58fcb Mon Sep 17 00:00:00 2001 From: Mango0x45 Date: Thu, 9 Sep 2021 02:42:25 +0200 Subject: Genesis commit --- extras/sizeof_struct_stat.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 extras/sizeof_struct_stat.c (limited to 'extras') diff --git a/extras/sizeof_struct_stat.c b/extras/sizeof_struct_stat.c new file mode 100644 index 0000000..67b6b9c --- /dev/null +++ b/extras/sizeof_struct_stat.c @@ -0,0 +1,12 @@ +#include + +#include +#include + +int +main(void) +{ + printf("Size of stat struct:\t%zu bytes\nOffset of st_size:\t%zu\n", sizeof(struct stat), + offsetof(struct stat, st_size)); + return 0; +} -- cgit v1.2.3