Created
April 9, 2026 07:42
-
-
Save pkutaj/aaaf33fda8dd4b74c7639740e76ffe66 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
| #include <stdio.h> | |
| typedef enum { OK = 200, NOT_FOUND = 404 } status_t; | |
| status_t s = NOT_FOUND; | |
| printf("status: %d\n", s); // 404 (C enums have no built-in way to print the label) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment