Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- typedef struct {
- int zot;
- } Foo;
- typedef struct {
- Foo foo;
- } Bar;
- int main() {
- Bar *b = (Bar *)malloc(sizeof (Bar));
- Foo *f = &b->foo;
- printf("bar = 0x%x, foo = 0x%x\n", b, f);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement