Created
February 1, 2010 06:57
-
-
Save erickt/291507 to your computer and use it in GitHub Desktop.
This file contains 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 <stddef.h> | |
#include <stdio.h> | |
typedef enum enum_t {tag} type; | |
struct TEST { char c; type mem; }; | |
int main() { | |
printf("%d\n", (int)offsetof(struct TEST, mem)); | |
printf("%d\n", (int)sizeof(type)); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment