I would like to ask a question concerning dynamic memory allocation in C++. I understand that the nature of the problem I am about to propose is easy to resolve using simple C++ techniques, but for this particular exercise I have to use a more C-like approach. Let me set an example:
I have the following structs:
typedef struct A{
    B *b;
    int a;
}
typedef struct B{
    C *c;
    int x;
}
typedef struct C{
    int y;
}
And let's assume this main:
int main(){
    A test;
    test.a = 1;
    test.b = (B*)calloc(2,sizeof(B));
    test.b[0].c = (C*)calloc(2,sizeof(C)); 
    test.b[0].x = 2; 
    test.b[0].c[0].y = 3;
    test.b[0].c[1].y = 4;
    test.b[1].c = (C*)calloc(2,sizeof(C));
    test.b[1].x = 5;
    test.b[1].c[0].y = 6;
    test.b[1].c[1].y = 7;
}
So my question is as follows: 
What happens? 
Is there a possibility the memory blocks allocated for test.b[i].c to overlap with the memory blocks that have been previously allocated for test.b?
If that is possible to happen how can I prevent it from happening?
If it is not possible can you explain exactly how calloc() allocates memory? I would really appreciate a numeric example. 
