Code:
void main()
{
 struct a
 {
   struct b
   {
     int i;
     float f;
   }x;

   struct c
   {
     int j;
     float g;
   }y;
 }z;

 fun(&z.y);
}

void fun(struct c * p)
{
  int offset;
  struct b * address;

   offset = (char *) & ((struct c *) (&((struct a *)0) -> y) -> j) - (char *)((struct    a*)0); 

   address = (struct b *)((char *) & (p -> j) - offset);
   address -> i = 200;
}
Can anyone explain how exactly are the two lines inside fun() that are assigning values to offset & address working ?