F
friend.05
typedef struct
{
int a;
int b;
int c;
} ABC;
typedef struct
{
int d;
int e;
int f;
ABC *abc;
} DEF;
Create function should use a single call to malloc to allocate
memoryfor structure DEF and its constituting structure ABC. In other
words, after a call to the CreateDEF() function, the following
statements should be valid and should work without segmentation
violations:
DEF* pDEF = CreateDEF();
pDEF-->abc-->a = 100 ;
DEF *CreateDEF ( void )
{
}
void FreeDEF (ABC *pABC)
{
}
{
int a;
int b;
int c;
} ABC;
typedef struct
{
int d;
int e;
int f;
ABC *abc;
} DEF;
Create function should use a single call to malloc to allocate
memoryfor structure DEF and its constituting structure ABC. In other
words, after a call to the CreateDEF() function, the following
statements should be valid and should work without segmentation
violations:
DEF* pDEF = CreateDEF();
pDEF-->abc-->a = 100 ;
DEF *CreateDEF ( void )
{
}
void FreeDEF (ABC *pABC)
{
}