/*
 * Test of code for http://stackoverflow.com/questions/15922878/pointer-to-a-nested-structure.
*/
 
#include <stdio.h>
#include <stdlib.h>
 
struct one
{
    struct two
    {
            int r;
    }*b;
}*a;
 
int main()
{
    a = malloc(sizeof *a);
    if(a != NULL)
    {
        a->b = malloc(sizeof *a->b);
        if(a->b != NULL)
        {
            a->b->r = 10;
            printf("the value is %d\n", a->b->r);
        }
    }
    return 0;
}
