diff options
| author | Karel Kočí <cynerd@email.cz> | 2025-10-04 12:47:24 +0200 |
|---|---|---|
| committer | Karel Kočí <cynerd@email.cz> | 2025-10-04 12:54:27 +0200 |
| commit | 24e314ca2b56f059f8af28a20b0d2215dbe33eaa (patch) | |
| tree | 12ed017ad24159eb99d2c4b8a50cf5d58af1a0ad /2025-linuxdays/anon.c | |
| parent | 58293a7863b4fc2f920bc03008f12f4f6e7ffcc8 (diff) | |
| download | presentations-24e314ca2b56f059f8af28a20b0d2215dbe33eaa.tar.gz presentations-24e314ca2b56f059f8af28a20b0d2215dbe33eaa.tar.bz2 presentations-24e314ca2b56f059f8af28a20b0d2215dbe33eaa.zip | |
Diffstat (limited to '2025-linuxdays/anon.c')
| -rw-r--r-- | 2025-linuxdays/anon.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/2025-linuxdays/anon.c b/2025-linuxdays/anon.c new file mode 100644 index 0000000..392534b --- /dev/null +++ b/2025-linuxdays/anon.c @@ -0,0 +1,17 @@ +#include <inttypes.h> +#include <stdio.h> + +int main(int argc, char *argv[]) { + struct point { + union { + struct { + uint32_t x, y; + }; + uint64_t u64; + }; + }; + + struct point a = {.x = 0x56, .y = 0x38}; + printf("%.16" PRIx64 "\n", a.u64); + return 0; +} |
