From ad416e233dea66d1d1d34f01759e3ac50c031ecf Mon Sep 17 00:00:00 2001 From: Cosmin Popa Date: Sat, 2 Mar 2024 14:12:27 +0200 Subject: [PATCH] Fix fmt specifier in course1 inspect struct --- curs/chap-01-prog/01-pointers/inspect_struct.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/curs/chap-01-prog/01-pointers/inspect_struct.c b/curs/chap-01-prog/01-pointers/inspect_struct.c index fe8ed280..322aa630 100644 --- a/curs/chap-01-prog/01-pointers/inspect_struct.c +++ b/curs/chap-01-prog/01-pointers/inspect_struct.c @@ -22,7 +22,7 @@ int main(void) ben.salary, ben.sex, ben.passport_number, ben.age); printf("&ben.salary: %p, &ben.sex: %p, &ben.passport_number: %p, &ben.age: %p\n", &ben.salary, &ben.sex, &ben.passport_number, &ben.age); - printf("offset(salary): %u, offset(sex): %u, offset(passport_number): %u, offset(age): %u\n", + printf("offset(salary): %tu, offset(sex): %tu, offset(passport_number): %tu, offset(age): %tu\n", (char *) &ben.salary - (char *) &ben, (char *) &ben.sex - (char *) &ben, (char *) &ben.passport_number - (char *) &ben,