How to find offset of struct member

struct
{

int a;
char b[30];
double d;
}

how to find at what possition does b starts or d starts. There is macro offsetof but that is not quite useful if you dont have struct available ie offsetof is not useful foe me. Please give any other way to to find offset.

Problem here is coming because of struct padding and alignment.

Hope you get it..!!