Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //test
- {
- /*
- struct st1{
- int x;
- int y;
- int z;
- };
- */
- struct st1{ int x; int y; int z; int b;};
- struct st2 {
- char* name;
- struct st1 stt1;
- };
- printf("sizeof int: %zu\n", sizeof(int));
- printf("sizeof char*: %zu\n", sizeof(char*));
- printf("%zu\n", sizeof (struct st1));
- printf("%zu\n", sizeof (struct st2));
- }
- /*
- sizeof int: 4
- sizeof char*: 8
- 16
- 24
- */
Advertisement
Add Comment
Please, Sign In to add comment