Created
April 9, 2026 07:42
-
-
Save pkutaj/8c85022ff4003869fb1c029d16e72b3a to your computer and use it in GitHub Desktop.
CTJ42_Union snippet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| typedef union lucky_value {int n; const char *s;} lucky_t; | |
| lucky_t pavol_luckies = {.n = 42}; | |
| printf("Pavol's lucky value: %s\n'", pavol_luckies.s); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment