All pastes #905536 Raw Edit

Stuff

public text v1 · immutable
·published 2008-02-15 21:09 UTC
rendered paste body
#include <stdio.h>

typedef enum {
		FOO,
		BAR,
		XUM
} FooEnum;

struct foo
{
	int bar;
};

struct bar
{
	FooEnum something;
	struct foo bam[23];
	int f1:3;
	int f2:5;
	int f3:32;
};

main()
{
	struct bar baz;

	printf ("%d\n%d\n", sizeof(baz.something), sizeof(baz.bam));
	printf ("%p\n%p\n", &(baz.something), &(baz.bam));
	printf ("%d\n", (char*)&(baz.bam) - (char*)&(baz));
/*	printf ("%d\n", (char*)&(baz.f1) - (char*)&(baz));
	printf ("%d\n", (char*)&(baz.f2) - (char*)&(baz));
	*/
}